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

Alexandre Oliva aoliva@redhat.com
Sun Feb 5 17:16:00 GMT 2006


On Feb  5, 2006, Alexandre Oliva <aoliva@redhat.com> wrote:

> 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.

> 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.

<URL:http://gcc.gnu.org/ml/gcc-patches/2001-11/msg02039.html> 

Hans, when you added that `- 16' after __builtin_dwarf_cfa(), back in
November, 2001, do you by any chance remember whether it was just
because that would get things to work, or did you have any supporting
evidence that the official definition of CFA was correctly implemented
by GCC?  I've tried to find the official definition all over the IA64
docs I could get my hands on, and I couldn't find it, so I suppose it
defers to the official DWARF docs, that define CFA as the stack
pointer just before the call, without any red zone offset added.

-- 
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