>>>>> "Segher" == Segher Boessenkool <seg...@kernel.crashing.org> writes:
>> Section 6.2.5.2 outlines the line number information state machine's >> opcodes. One of them is "DW_LNS_set_epilogue_begin". Its definition >> is: Segher> How should this work with shrink-wrapping? The whole point of that is Segher> you do not tear down the frame after all other code, etc. I don't see Segher> how we can do better than putting this DW_LNS_set_epilogue_begin right Segher> before the actual return -- and that is after all the tear down etc. I think it's fine if the epilogue marker is inexact or missing from optimized code, because (1) that's the current state, and (2) it doesn't really make sense to talk about an epilogue in some cases. Similarly, IMO it is fine not to worry about non-local exits. You can already catch exceptions and examine them in gdb -- the epilogue marker feature is mostly to address the unmet need of wanting to set a breakpoint at the end of a function. Ideally, in -O0 / -Og code, the marker would be reliable where it appears. It would be great if there was a way to indicate the location of the value-to-be-returned in the DWARF. That way gdb could extract it at the epilogue point. AFAIK this would require a DWARF extension. thanks, Tom