aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2018-01-19 06:06:48 +0100
committerBjörn Gustavsson <[email protected]>2018-01-19 06:08:28 +0100
commit825edd6dbaf1987cee2e6571765376ff3e8c0180 (patch)
tree9f5fb64b72d5d89e218efb282e23c4d8be4760dc /erts/emulator/beam
parent1f802279f79ff3a7f1ded5604d6433a6cd448448 (diff)
downloadotp-825edd6dbaf1987cee2e6571765376ff3e8c0180.tar.gz
otp-825edd6dbaf1987cee2e6571765376ff3e8c0180.tar.bz2
otp-825edd6dbaf1987cee2e6571765376ff3e8c0180.zip
beam_debug: Fix printing of f operand for catch_yf
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r--erts/emulator/beam/beam_debug.c32
1 files changed, 20 insertions, 12 deletions
diff --git a/erts/emulator/beam/beam_debug.c b/erts/emulator/beam/beam_debug.c
index 188cbbe915..8f02d509a9 100644
--- a/erts/emulator/beam/beam_debug.c
+++ b/erts/emulator/beam/beam_debug.c
@@ -40,6 +40,7 @@
#include "erl_binary.h"
#include "erl_thr_progress.h"
#include "erl_nfunc_sched.h"
+#include "beam_catches.h"
#ifdef ARCH_64
# define HEXF "%016bpX"
@@ -609,18 +610,25 @@ print_op(fmtfn_t to, void *to_arg, int op, int size, BeamInstr* addr)
ap++;
break;
case 'f': /* Destination label */
- {
- BeamInstr* target = f_to_addr(addr, op, ap);
- ErtsCodeMFA* cmfa = find_function_from_pc(target);
- if (!cmfa || erts_codemfa_to_code(cmfa) != target) {
- erts_print(to, to_arg, "f(" HEXF ")", target);
- } else {
- erts_print(to, to_arg, "%T:%T/%bpu", cmfa->module,
- cmfa->function, cmfa->arity);
- }
- ap++;
- }
- break;
+ switch (op) {
+ case op_catch_yf:
+ erts_print(to, to_arg, "f(" HEXF ")", catch_pc((BeamInstr)*ap));
+ break;
+ default:
+ {
+ BeamInstr* target = f_to_addr(addr, op, ap);
+ ErtsCodeMFA* cmfa = find_function_from_pc(target);
+ if (!cmfa || erts_codemfa_to_code(cmfa) != target) {
+ erts_print(to, to_arg, "f(" HEXF ")", target);
+ } else {
+ erts_print(to, to_arg, "%T:%T/%bpu", cmfa->module,
+ cmfa->function, cmfa->arity);
+ }
+ ap++;
+ }
+ break;
+ }
+ break;
case 'p': /* Pointer (to label) */
{
BeamInstr* target = f_to_addr(addr, op, ap);