From 7062f8dff2ddd110ec95c1b162273ea63c37897f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Thu, 11 Nov 2010 14:19:21 +0100 Subject: 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. --- erts/emulator/beam/beam_debug.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'erts/emulator') 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; -- cgit v1.2.3