From 2fddc92c1bdadfdf5e49b6b3158fa88bfe118f58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Fri, 15 Oct 2021 05:13:50 +0200 Subject: wip --- erts/emulator/beam/emu/beam_emu.c | 4 ++-- erts/emulator/beam/emu/bs_instrs.tab | 2 +- erts/emulator/beam/global.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/erts/emulator/beam/emu/beam_emu.c b/erts/emulator/beam/emu/beam_emu.c index dd35859559..2d3a7bd82a 100644 --- a/erts/emulator/beam/emu/beam_emu.c +++ b/erts/emulator/beam/emu/beam_emu.c @@ -715,7 +715,7 @@ erts_beam_jump_table(void) } void -erts_prepare_bs_construct_fail_info(Process* c_p, const BeamInstr* p, Eterm reason, Eterm Info) +erts_prepare_bs_construct_fail_info(Process* c_p, const BeamInstr* p, Eterm reason, Eterm Info, Eterm value) { Eterm* hp; Eterm cause_tuple; @@ -759,7 +759,7 @@ erts_prepare_bs_construct_fail_info(Process* c_p, const BeamInstr* p, Eterm reas } hp = HeapFragOnlyAlloc(c_p, MAP3_SZ+4+1); - cause_tuple = TUPLE4(hp, make_small(segment), op, Info, NIL); + cause_tuple = TUPLE4(hp, make_small(segment), op, Info, value); hp += 5; error_info = MAP3(hp, am_cause, cause_tuple, diff --git a/erts/emulator/beam/emu/bs_instrs.tab b/erts/emulator/beam/emu/bs_instrs.tab index 5202096f9c..7ca7c4e711 100644 --- a/erts/emulator/beam/emu/bs_instrs.tab +++ b/erts/emulator/beam/emu/bs_instrs.tab @@ -872,7 +872,7 @@ BS_LOAD_FIXED_SIZE(Ptr, Dst) { } BS_FAIL_INFO(Fail, Reason, ErrorType) { - erts_prepare_bs_construct_fail_info(c_p, p, $Reason, $ErrorType); + erts_prepare_bs_construct_fail_info(c_p, p, $Reason, $ErrorType, am_control); $FAIL_HEAD_OR_BODY($Fail); } diff --git a/erts/emulator/beam/global.h b/erts/emulator/beam/global.h index 2d5fced7c8..d5cc83079b 100644 --- a/erts/emulator/beam/global.h +++ b/erts/emulator/beam/global.h @@ -1236,7 +1236,7 @@ void print_pass_through(int, byte*, int); int catchlevel(Process*); void init_emulator(void); void process_main(ErtsSchedulerData *); -void erts_prepare_bs_construct_fail_info(Process* c_p, const BeamInstr* p, Eterm reason, Eterm Info); +void erts_prepare_bs_construct_fail_info(Process* c_p, const BeamInstr* p, Eterm reason, Eterm Info, Eterm value); void erts_dirty_process_main(ErtsSchedulerData *); Eterm build_stacktrace(Process* c_p, Eterm exc); Eterm expand_error_value(Process* c_p, Uint freason, Eterm Value); -- cgit v1.2.1