Problem with location lists and variables on stack

Josef Zlomek zlomj9am@artax.karlin.mff.cuni.cz
Wed Oct 1 17:48:00 GMT 2003


> > > The frame base is evaluated in the function's current context, not via
> > > unwinding.  So if GCC is using the CFA, then it needs to say so
> > > somehow.  It would be nice if it could reference the parent's stack
> > > pointer somehow and save duplication.  A mostly-relevant quote from the
> > > spec:
> > > 
> > >   In the context of supporting nested subroutines, the DW_AT_frame_base
> > >   attribute value should obey the following constraints:
> > > 
> > >   1. It should compute a value that does not change during the life of
> > >   the procedure, and
> > 
> > So shall the location for all variables located on stack be reemitted with the
> > changed offset after each push/pop? That would mean longer debug info.
> > I thought better idea would be adjusting the offsets from frame base in GDB.
> 
> No, but DW_AT_frame_base should be a location list describing the
> changes in the frame base.

I see. Thanks!

Josef



More information about the Gdb mailing list