aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2015-07-03 14:23:39 +0200
committerBjörn Gustavsson <[email protected]>2015-07-03 14:23:39 +0200
commit99003f395207a23935bfd2859f9c7121da5110eb (patch)
treec796395f38e14c7190cadbebfe7068788d7b945d /erts/emulator/beam
parentc28bfd7e33e5e08a01737ff2ff82f1e6e1e0e484 (diff)
parent16317f73f79265eba8e0cef4adaea6f6858d389b (diff)
downloadotp-99003f395207a23935bfd2859f9c7121da5110eb.tar.gz
otp-99003f395207a23935bfd2859f9c7121da5110eb.tar.bz2
otp-99003f395207a23935bfd2859f9c7121da5110eb.zip
Merge branch 'bjorn/erts/beam_debug' into maint
* bjorn/erts/beam_debug: 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.c27
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");