aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/beam_debug.c
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2010-11-11 14:19:21 +0100
committerBjörn Gustavsson <[email protected]>2011-01-17 15:23:37 +0100
commit7062f8dff2ddd110ec95c1b162273ea63c37897f (patch)
tree17686e5ca731b813b44da502336ca08325fb571f /erts/emulator/beam/beam_debug.c
parentd310a5cb703822e95fa4c76c5c8ec566e5027a17 (diff)
downloadotp-7062f8dff2ddd110ec95c1b162273ea63c37897f.tar.gz
otp-7062f8dff2ddd110ec95c1b162273ea63c37897f.tar.bz2
otp-7062f8dff2ddd110ec95c1b162273ea63c37897f.zip
beam_debug: Fix dissambly of some variable-operand instructions
The i_jump_on_val_zero/3 and i_select_tuple_arity/3 instructions were not disassembled correctly.
Diffstat (limited to 'erts/emulator/beam/beam_debug.c')
-rw-r--r--erts/emulator/beam/beam_debug.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/erts/emulator/beam/beam_debug.c b/erts/emulator/beam/beam_debug.c
index f73d0b31a2..5ada352202 100644
--- a/erts/emulator/beam/beam_debug.c
+++ b/erts/emulator/beam/beam_debug.c
@@ -559,6 +559,19 @@ print_op(int to, void *to_arg, int op, int size, BeamInstr* addr)
}
}
break;
+ case op_i_select_tuple_arity_sfI:
+ {
+ int n = ap[-1];
+
+ while (n > 0) {
+ Uint arity = arityval(ap[0]);
+ erts_print(to, to_arg, " {%d} f(" HEXF ")", arity, ap[1]);
+ ap += 2;
+ size += 2;
+ n--;
+ }
+ }
+ break;
case op_i_jump_on_val_sfII:
{
int n;
@@ -569,6 +582,16 @@ print_op(int to, void *to_arg, int op, int size, BeamInstr* addr)
}
}
break;
+ case op_i_jump_on_val_zero_sfI:
+ {
+ int n;
+ for (n = ap[-1]; n > 0; n--) {
+ erts_print(to, to_arg, "f(" HEXF ") ", ap[0]);
+ ap++;
+ size++;
+ }
+ }
+ break;
case op_i_select_big_sf:
while (ap[0]) {
Eterm *bigp = (Eterm *) ap;