[Lldb-commits] [PATCH] D112069: [lldb][AArch64] Add UnwindPlan for Linux sigreturn

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Oct 27 03:22:16 PDT 2021


labath added a comment.

Since the signal context contains a copy of all registers, maybe you should be setting all of them. The other registers will not be used for unwinding, but they will enable to user to inspect the registers in the stack frames above the signal handler.
One way to demonstrate (and test) this would be to have a bit of inline asm, which sets all registers to known values, and then raises a signal (SIGILL is probably the easiest to raise from asm). Then lldb breaks on the signal handler, goes up the stack, and observes the registers.



================
Comment at: lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp:295
+  unwind_plan_sp->SetUnwindPlanForSignalTrap(eLazyBoolYes);
+  unwind_plan_sp->SetRegisterKind(eRegisterKindDWARF);
+
----------------
labath wrote:
> Ah now I see that it worked because of this. Maybe you could try dropping this line and replace the dwarf numbers with generic regnums?
Except of course, if you end up setting all of the registers.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112069/new/

https://reviews.llvm.org/D112069



More information about the lldb-commits mailing list