aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2015-06-17 17:14:20 +0200
committerBjörn-Egil Dahlberg <[email protected]>2015-06-17 17:14:20 +0200
commitea1b6f0c39b577860e01bf088bbb97b8d814fa43 (patch)
tree9a6c1a8a5ccb0048789119fa34f7fea1f7238719 /erts/emulator/beam
parent5bb94487ce804f8a075e1c710c447f72d22e3d56 (diff)
parentdb193ba5dac15b1341a622307adbaf55002531b4 (diff)
downloadotp-ea1b6f0c39b577860e01bf088bbb97b8d814fa43.tar.gz
otp-ea1b6f0c39b577860e01bf088bbb97b8d814fa43.tar.bz2
otp-ea1b6f0c39b577860e01bf088bbb97b8d814fa43.zip
Merge branch 'egil/fix-erts_debug-disasm-select_tuple_arity'
* egil/fix-erts_debug-disasm-select_tuple_arity: erts: Fix erts_debug:df/1 in debug
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r--erts/emulator/beam/beam_debug.c40
1 files changed, 22 insertions, 18 deletions
diff --git a/erts/emulator/beam/beam_debug.c b/erts/emulator/beam/beam_debug.c
index 0367ca8aba..78ddecafc3 100644
--- a/erts/emulator/beam/beam_debug.c
+++ b/erts/emulator/beam/beam_debug.c
@@ -616,24 +616,28 @@ print_op(int to, void *to_arg, int op, int size, BeamInstr* addr)
case op_i_select_tuple_arity_rfI:
case op_i_select_tuple_arity_xfI:
case op_i_select_tuple_arity_yfI:
- {
- int n = ap[-1];
- int ix = n;
-
- while (ix--) {
- Uint arity = arityval(ap[0]);
- erts_print(to, to_arg, "{%d} ", arity, ap[1]);
- ap++;
- size++;
- }
- ix = n;
- while (ix--) {
- erts_print(to, to_arg, "f(" HEXF ") ", ap[0]);
- ap++;
- size++;
- }
- }
- break;
+ {
+ int n = ap[-1];
+ int ix = n - 1; /* without sentinel */
+
+ while (ix--) {
+ Uint arity = arityval(ap[0]);
+ erts_print(to, to_arg, "{%d} ", arity, ap[1]);
+ ap++;
+ size++;
+ }
+ /* print sentinel */
+ erts_print(to, to_arg, "{%T} ", ap[0], ap[1]);
+ ap++;
+ size++;
+ ix = n;
+ while (ix--) {
+ erts_print(to, to_arg, "f(" HEXF ") ", ap[0]);
+ ap++;
+ size++;
+ }
+ }
+ break;
case op_i_jump_on_val_rfII:
case op_i_jump_on_val_xfII:
case op_i_jump_on_val_yfII: