This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix PR debug/24444: incorrect frame base in IA64 prologues
On Sun, Feb 05, 2006 at 06:38:52PM -0200, Alexandre Oliva wrote:
> On Feb 5, 2006, Daniel Jacobowitz <drow@false.org> wrote:
>
> > On Sun, Feb 05, 2006 at 06:16:16PM -0200, Alexandre Oliva wrote:
> >> On Feb 5, 2006, Daniel Jacobowitz <drow@false.org> wrote:
> >>
> >> > Just a general note: once a platform has defined the CFA with or
> >> > without a particular bias to the caller's SP, you can't change it.
> >> > It's an ABI break of a peculiar sort for debuggers.
> >>
> >> This would be true if the CFA was actually defined anywhere in debug
> >> info.
>
> > This suggests to me that relying on something named __builtin_dwarf_cfa
> > for IA64 is pretty silly.
>
> Perhaps. But since we're talking about a library that is internal to
> GCC, and a use that is limited to computing the previous stack pointer
> (the generic definition of CFA) of the function that uses the builtin,
> I don't see anything fundamentally wrong about it.
>
> Can you suggest a better alternative to obtain the caller's stack
> pointer? I'm not sure __builtin_frame_address() would give what we
> want, and it's not even portable with a nonzero argument. Not to
> mention that what we want is not the frame address of the caller, nor
> our own frame pointer: we want the caller's stack pointer.
I don't think you need a different mechanism; but it might be wise
to use an ia64-specific builtin (since this is ia64-specific code and
you know that it will use ia64-specific unwind data). Make it clear
that you're not dealing with the DWARF instance of CFA at all.
--
Daniel Jacobowitz
CodeSourcery