Fix PR debug/24444: incorrect frame base in IA64 prologues

Alexandre Oliva aoliva@redhat.com
Sun Feb 5 15:48:00 GMT 2006


On Feb  5, 2006, Richard Henderson <rth@redhat.com> wrote:

> On Sat, Feb 04, 2006 at 04:54:11PM -0200, Alexandre Oliva wrote:
>> As it turned out, testing revealed that stack unwinding was thoroughly
>> broken, because of the fix to the definition of the CFA location from
>> past the red zone to the literal SP value.  This broke unwind-ia64.c's
>> uw_init_context_1, that used to compensate for the incorrect CFA
>> value.  Since you'd confirmed in private that the CFA fix was correct,
>> I'll proceed to check in this patch without further approval, unless
>> retesting reveals any remaining regressions.

> Hum.  Perhaps I was wrong.  This definitely needs testing
> vs the external libunwind.

FWIW, I did test it with it, and it worked fine.  It doesn't really
make any difference: AFAICT the CFA info is nowhere to be found in the
unwind info used by it, and the debug info, that actually changed, is
not used for unwinding at all (and it couldn't be, since
DW_AT_frame_base is arbitrary, not necessarily associated with the
CFA).  It's just that our unwind-ia64.c needed to start the stack
unwinding at the current stack frame, and to locate the current stack
frame it used __builtin_dwarf_cfa(), whose meaning changed.

-- 
Alexandre Oliva         http://www.lsd.ic.unicamp.br/~oliva/
Secretary for FSF Latin America        http://www.fsfla.org/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}



More information about the Gcc-patches mailing list