mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-14 04:18:11 +01:00
2aea391d6a
After successfully stepping the cursor on ARM, the proc info is invalidated only in dwarf_step(). Invalidate the proc info also when stepping with the non-dwarf based methods. This fixes unw_get_proc_info() returning stale data. The core dump unwinder can be used for demonstrating the bug. When unwinding based only on DWARF data, the proc info is correct: $ UNW_ARM_UNWIND_METHOD=1 ./test-coredump-unwind core `cat backing_files` 2>/dev/null ip=0x000086d8 proc=000086d4-000086dc handler=0x00000000 lsda=0x00000000 ip=0x000086ef proc=000086dc-000086f2 handler=0x00000000 lsda=0x00000000 ip=0x000086e7 proc=000086dc-000086f2 handler=0x00000000 lsda=0x00000000 ip=0x00008597 proc=00008584-0000859a handler=0x00000000 lsda=0x00000000 ip=0x76e3ac3b proc=76e3aba0-76e3acec handler=0x00000000 lsda=0x00000000 When unwinding based only on the exidx method, we see the proc info lagging behind: $ UNW_ARM_UNWIND_METHOD=4 ./test-coredump-unwind core `cat backing_files` 2>/dev/null ip=0x000086d8 proc=000086d4-000086db handler=0x00000000 lsda=0x00000000 ip=0x000086ef proc=000086d4-000086db handler=0x00000000 lsda=0x00000000 ip=0x000086e7 proc=000086dc-000086f3 handler=0x00000000 lsda=0x00000000 ip=0x00008597 proc=000086dc-000086f3 handler=0x00000000 lsda=0x00000000 ip=0x76e3ac3b proc=00008584-0000859b handler=0x00000000 lsda=0x00000000 ip=0x000085c3 proc=76e3aba0-76e3ae4b handler=0x00000000 lsda=0x00000000 Finally, with this patch applied, we get the desired proc info also with the exidx unwinder: $ UNW_ARM_UNWIND_METHOD=4 ./test-coredump-unwind core `cat backing_files` 2>/dev/null ip=0x000086d8 proc=000086d4-000086db handler=0x00000000 lsda=0x00000000 ip=0x000086ef proc=000086dc-000086f3 handler=0x00000000 lsda=0x00000000 ip=0x000086e7 proc=000086dc-000086f3 handler=0x00000000 lsda=0x00000000 ip=0x00008597 proc=00008584-0000859b handler=0x00000000 lsda=0x00000000 ip=0x76e3ac3b proc=76e3aba0-76e3ae4b handler=0x00000000 lsda=0x00000000 ip=0x000085c3 proc=0000859c-00008613 handler=0x00000000 lsda=0x00000000 |
||
---|---|---|
.. | ||
Gcreate_addr_space.c | ||
gen-offsets.c | ||
getcontext.S | ||
Gex_tables.c | ||
Gget_proc_info.c | ||
Gget_save_loc.c | ||
Gglobal.c | ||
Ginit.c | ||
Ginit_local.c | ||
Ginit_remote.c | ||
Gis_signal_frame.c | ||
Gregs.c | ||
Gresume.c | ||
Gstep.c | ||
init.h | ||
is_fpreg.c | ||
Lcreate_addr_space.c | ||
Lex_tables.c | ||
Lget_proc_info.c | ||
Lget_save_loc.c | ||
Lglobal.c | ||
Linit.c | ||
Linit_local.c | ||
Linit_remote.c | ||
Lis_signal_frame.c | ||
Lregs.c | ||
Lresume.c | ||
Lstep.c | ||
offsets.h | ||
regname.c | ||
siglongjmp.S | ||
unwind_i.h |