This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB 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: [rfc] frame->frame => frame->addr && frame->base()


> // High level language concept of the base address of a frame.  Often 
>> refered to as ``frame_base'' or ``frame pointer''.  This value should 
>> only be computed on-demand.  It is strongly recommended, though, that 
>> implementations cache the computed value in the frame cache.  The method 
>> is initialized as part of the frame objects creation.  The default 
>> method returns frame->addr.  (see dwarf2 DW_AT_frame_base)
>> 
>> CORE_ADDR (*base) (struct frame_info *frame);
> 
> 
> This translates the CFA (canonical frame address) into an address that's
> useful for some other purpose, right?  What are the purposes that it
> would be used for?

Strictly speaking it doesn't translate a CFA.  The CFA is something 
private to the CFI code.   It is just that it happens to evaluate to the 
same value.

In dwarf2, the debug info may indicate that both ->addr and ->base have 
the value of [r31]+10.

> (My worry is that there may be more than one translation which might
> prove to be useful.)

True.

The intent is for dwarf2 where a location expression can contain 
references to ``fpreg''.  That is really a reference to the current 
value of DW_AT_frame_base.  I guess the comment should emphasize how it 
relates to debug info and the debug ``frame base'' register.

Andrew


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