[Lldb-commits] [PATCH] D18977: Add new ABI callback to provide fallback unwind register locations

Ulrich Weigand via lldb-commits lldb-commits at lists.llvm.org
Wed Apr 13 04:49:50 PDT 2016

uweigand added a comment.

In http://reviews.llvm.org/D18977#399344, @jasonmolenda wrote:

> Just to be clear, my concern is we get an register location which is "undefined" (I've never seen it, I don't know what it means) and now SavedLocationForRegister() will say "this register is volatile, not looking any further" when it used to say "register not found in this stack frame" and the unwinder would keep looking down the stack for a save location.

Note that the default state of a register location if no CFI was found at all is "unspecified", which my patch leaves unchanged.  A register location can only be "undefined" if it was explicitly set to that state.  The only way this can happen, except for my new code in the GetFallbackRegisterLocation, is as a result of a DW_CFA_undefined entry in DWARF CFI.

As Tamas points out, that DWARF opcode is defined to mean the register is not recoverable in this frame, i.e. treating it as "volatile" should do exactly the right thing.  (Note that this may be mostly theoretical, since I've not seen any compiler ever in fact issue DW_CFA_undefined ...)

This is was I was briefly alluding to in my original comment "this might now theoretically also trigger when CFI contains an explicit DW_CFA_undefined, but it should actually do the right thing then as well."


More information about the lldb-commits mailing list