diff options
author | Lukas Larsson <lukas@erlang.org> | 2021-10-13 09:42:17 +0200 |
---|---|---|
committer | Lukas Larsson <lukas@erlang.org> | 2021-11-30 11:55:39 +0100 |
commit | 710045d6b5389be027fa389c8cc63e41ebec29f3 (patch) | |
tree | db47fa5f98a2e4a3eab58b8a19b5351d5c12f72e /erts/emulator/beam/erl_process_dump.c | |
parent | d297de6314d78fb1aef7258d76867e792f09e787 (diff) | |
download | erlang-710045d6b5389be027fa389c8cc63e41ebec29f3.tar.gz |
erts: Print stackdump in crashdump/procdump with y prefix
In OTP-23 the placement of the top frame was changed and that
caused the stackdump printing algorithm to not prefix variables
in the first frame with y. i.e.
0x00007f72440b76f0:N
0x00007f72440b76f8:SReturn addr 0x44381898 (proc_lib:init_p_do_apply/3 + 72)
y0:P<0.9.0>
y1:P<0.10.0>
0x00007f72440b7718:SReturn addr 0x66325748 (<terminate process normally>)
was written instead of
y0:N
0x00007f72440b76f8:SReturn addr 0x44381898 (proc_lib:init_p_do_apply/3 + 72)
y0:P<0.9.0>
y1:P<0.10.0>
0x00007f72440b7718:SReturn addr 0x66325748 (<terminate process normally>)
The same issue was also fixed for erlang:process_display,
erlang:process_info(backtrace) and the ctrl-c proc dump.
Diffstat (limited to 'erts/emulator/beam/erl_process_dump.c')
-rw-r--r-- | erts/emulator/beam/erl_process_dump.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/erts/emulator/beam/erl_process_dump.c b/erts/emulator/beam/erl_process_dump.c index 3beafb4b3c..77bd344352 100644 --- a/erts/emulator/beam/erl_process_dump.c +++ b/erts/emulator/beam/erl_process_dump.c @@ -48,8 +48,8 @@ static void dump_process_info(fmtfn_t to, void *to_arg, Process *p); static void dump_element(fmtfn_t to, void *to_arg, Eterm x); static void dump_dist_ext(fmtfn_t to, void *to_arg, ErtsDistExternal *edep); static void dump_element_nl(fmtfn_t to, void *to_arg, Eterm x); -static int stack_element_dump(fmtfn_t to, void *to_arg, Eterm* sp, - int yreg); +static Uint stack_element_dump(fmtfn_t to, void *to_arg, Eterm* sp, + Uint yreg); static void stack_trace_dump(fmtfn_t to, void *to_arg, Eterm* sp); static void print_function_from_pc(fmtfn_t to, void *to_arg, ErtsCodePtr x); static void heap_dump(fmtfn_t to, void *to_arg, Eterm x); @@ -223,7 +223,7 @@ static void dump_process_info(fmtfn_t to, void *to_arg, Process *p) { Eterm* sp; - int yreg = -1; + Uint yreg = 0; if (ERTS_TRACE_FLAGS(p) & F_SENSITIVE) return; @@ -403,8 +403,8 @@ erts_limited_stack_trace(fmtfn_t to, void *to_arg, Process *p) } -static int -stack_element_dump(fmtfn_t to, void *to_arg, Eterm* sp, int yreg) +static Uint +stack_element_dump(fmtfn_t to, void *to_arg, Eterm* sp, Uint yreg) { Eterm x = *sp; |