[Lldb-commits] [PATCH] D61733: Breakpad: Generate unwind plans from STACK CFI records
Jason Molenda via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu May 9 17:34:50 PDT 2019
jasonmolenda accepted this revision.
jasonmolenda added inline comments.
Comment at: source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp:418
+ if (name == ".ra")
+ return resolver.ResolveNumber(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_PC);
+ return ResolveRegister(resolver, name);
> clayborg wrote:
> > LLDB_REGNUM_GENERIC_RA? Do we want the PC here or do we want the link register?
> It looks a bit weird, but I believe it should be the PC (and I have checked that things unwind correctly this way), because we are specifying value for the PC in the parent frame (which is the same as the return address of the current frame). Or, to put it another way, breakpad uses ".ra" even on platforms which do not have a LLDB_REGNUM_GENERIC_RA register (like x86).
This is fine, fwiw RegisterContextLLDB won't try to use LLDB_REGNUM_GENERIC_RA on architectures that don't use a return address register (e.g. lr on arm), so using LLDB_REGNUM_GENERIC_PC is correct if we ever need to do this unwind on an x86 breakpad file.
CHANGES SINCE LAST ACTION
More information about the lldb-commits