This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]