[Bug debug/53927] wrong value for DW_AT_static_link

ebotcazou at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Mar 10 09:41:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53927

--- Comment #23 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> The offset between the CFA and e FRAME object is now 0x90 bytes. So
> because of alignment constraints, I think we cannot assume we can have a
> constant offset (even function-dependent).
> 
> This offset is dynamic and the only way to compute it is to use the
> frame's context: here, nestee's saved registers, which we don't have
> access to in DWARF when computing the static link attribute.

OK, thanks for the investigation, the counter-example is quite telling and puts
an end to this approach.  To rescue some of this work, you could add a line to
the comment in the finalize_nesting_tree_1 hunk, explaining that we need to go
through the BUILT_IN_DWARF_CFA indirection because the offset of the FRAME
object in the stack frame can be dynamic if the FRAME object needs to be more
aligned than the stack.



More information about the Gcc-bugs mailing list