This is the mail archive of the gdb-patches@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: RFA: DW_AT_frame_base fix for complicated frames


On Thu, Oct 02, 2003 at 12:54:32PM -0500, Jim Blandy wrote:
> 
> Daniel Jacobowitz <drow@mvista.com> writes:
> > Does anyone remember a specific reason why this code was there?  I don't,
> > and I rewrote all of this stuff... I am 99.99% sure it's based on the unwind
> > handling for saved registers, where we get either a register number or the
> > address of a stack slot.  But for frame bases that's not true:
> > 
> > A subroutine or entry point entry may also have a DW_AT_frame_base
> > attribute, whose value is a location description that computes the "frame
> > base" for the subroutine or entry point.
> > 
> > i.e. it computes the frame base.  Not the address of the frame base.  This
> > memory read tends to find (on x86) the return address, and then we think the
> > stack is at <main+34>.  Oopsie.
> > 
> > OK?  With this patch and some code Daniel Berlin and Joseph are working on,
> > location lists actually work.  I can see all the arguments in an
> > -fomit-frame-pointer function from the beginning.  It's really quite cool.
> 
> I think you're right, there's no reason for that memory fetch to be
> there.  Please commit.

Thanks.  I've committed this to trunk and branch.  I also moved this to
the branch:

2003-10-09  Daniel Jacobowitz  <drow@mvista.com>

        Merge from mainline:
        2003-07-31  Daniel Jacobowitz  <drow@mvista.com>

        * dwarf2read.c (new_symbol): Use var_decode_location for parameters.

Location expressions and lists should work reasonably well on both now.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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