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]

Re: Integrating DWARF2 CFA info




On Wed, 9 May 2001, Andrew Cagney wrote:

> > So i've got the dwarf2 CFA info being used now, when available, to
> > find the location of a register.
>
> (What exactly does CFA mean.  I know what you're refering to, just not
> the acronym).
>
Call Frame Annotation.

>
> > gdbarch functions aren't stackable, so i can't just implement a
> > dwarf2_get_saved_register that uses the dwarf2 cfa info, and if it's
> > not available, calls the next lower level get_saved_register function.
>
> I don't think a stack is applicable here.  As you move between frames
> the debug info could change and the get_saved_register() functions
> should adapt accordingly.  Having a stack would imply a specific
> heirichy and that isn't correct in this case.
Well, actually, IMHO, it is.
The CFA info gives us the location of all saved registers for the entire
procedure.
It's always correct, even in the presence of optimization.
Given the pc for the frame, it can tell you exactly where all the saved
registers are, at that particular point in time.
Therefore, it is strictly better to use the CFA info, than scan the
instructions.

So I see a strict hiearchy of what to use:
Dwarf2 CFA Info
<whatever else>

>
> 	Andrew
>
>


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