diff options
author | Björn Gustavsson <[email protected]> | 2015-07-03 14:25:49 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2015-07-03 14:25:49 +0200 |
commit | 26f1810479a837ab338e7a9e3aef027a9e4b098d (patch) | |
tree | 996f0d33eff15d709f10f6b56fc2a4d058875fac /erts/emulator/beam | |
parent | 3db7a35080d2836476a38d85391e1fcb7e7feb86 (diff) | |
parent | 99003f395207a23935bfd2859f9c7121da5110eb (diff) | |
download | otp-26f1810479a837ab338e7a9e3aef027a9e4b098d.tar.gz otp-26f1810479a837ab338e7a9e3aef027a9e4b098d.tar.bz2 otp-26f1810479a837ab338e7a9e3aef027a9e4b098d.zip |
Merge branch 'maint'
* maint:
Add a smoke test of erts_debug:df/1
Correct disassembly of the i_get_map_elements instruction
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r-- | erts/emulator/beam/beam_debug.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/erts/emulator/beam/beam_debug.c b/erts/emulator/beam/beam_debug.c index c756de8c8e..8a35ad17c6 100644 --- a/erts/emulator/beam/beam_debug.c +++ b/erts/emulator/beam/beam_debug.c @@ -669,7 +669,6 @@ print_op(int to, void *to_arg, int op, int size, BeamInstr* addr) case op_new_map_dII: case op_update_map_assoc_jsdII: case op_update_map_exact_jsdII: - case op_i_get_map_elements_fsI: { int n = unpacked[-1]; @@ -693,6 +692,32 @@ print_op(int to, void *to_arg, int op, int size, BeamInstr* addr) } } break; + case op_i_get_map_elements_fsI: + { + int n = unpacked[-1]; + + while (n > 0) { + if (n % 3 == 1) { + erts_print(to, to_arg, " %X", ap[0]); + } else if (!is_header(ap[0])) { + erts_print(to, to_arg, " %T", (Eterm) ap[0]); + } else { + switch ((ap[0] >> 2) & 0x03) { + case R_REG_DEF: + erts_print(to, to_arg, " x(0)"); + break; + case X_REG_DEF: + erts_print(to, to_arg, " x(%d)", ap[0] >> 4); + break; + case Y_REG_DEF: + erts_print(to, to_arg, " y(%d)", ap[0] >> 4); + break; + } + } + ap++, size++, n--; + } + } + break; } erts_print(to, to_arg, "\n"); |