aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2019-03-12 05:45:26 +0100
committerBjörn Gustavsson <[email protected]>2019-03-19 16:01:59 +0100
commitced0646cdc26a6b21029a74a7def558d68882594 (patch)
tree243449f8edaef1b2d345dd860bb0047c12df56bd
parent18a02b5d63c2994afca8500ea82e076f03379ac2 (diff)
downloadotp-ced0646cdc26a6b21029a74a7def558d68882594.tar.gz
otp-ced0646cdc26a6b21029a74a7def558d68882594.tar.bz2
otp-ced0646cdc26a6b21029a74a7def558d68882594.zip
beam_debug: Stop disassembling after call_nif
That will avoid showing garbage instructions that will never be executed.
-rw-r--r--erts/emulator/beam/beam_debug.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/erts/emulator/beam/beam_debug.c b/erts/emulator/beam/beam_debug.c
index 1611f755eb..96cbe33090 100644
--- a/erts/emulator/beam/beam_debug.c
+++ b/erts/emulator/beam/beam_debug.c
@@ -332,6 +332,13 @@ erts_debug_disassemble_1(BIF_ALIST_1)
"unknown " HEXF "\n", instr);
code_ptr++;
}
+ if (i == op_call_nif) {
+ /*
+ * The rest of the code will not be executed. Don't disassemble any
+ * more code in this function.
+ */
+ code_ptr = 0;
+ }
bin = new_binary(p, (byte *) dsbufp->str, dsbufp->str_len);
erts_destroy_tmp_dsbuf(dsbufp);
hsz = 4+4;