This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Problem with location lists and variables on stack
On Mon, Oct 06, 2003 at 10:48:12AM -0400, Daniel Berlin wrote:
> >>Daniel Berlin has already written support for GCC to generate location
> >>list for DW_AT_frame_base.
> >>DW_AT_frame_base is a location list as any other (actually only the
> >>offsets relatively to original stack pointer at function start are
> >>needed).
> >>GDB then uses this location list to adjust offsets of other variables
> >>addressed using stack pointer.
> >>With Daniel Jacobowitz's fix for GDB it works :-)
> >>i.e. you can see correct values for variables located on stack
> >>even when stack pointer changes because of push, pop, etc.
> >>
> >>Current GCC patch can be downloaded from:
> >>http://artax.karlin.mff.cuni.cz/~zlomj9am/download/vt-main.patch
> >>
> >>(because currently GCC is in stage 2 it has to wait until GCC is in
> >>stage 1)
> >
> >I suppose this is true, but it's really unfortunate.
>
> I'm not so sure it's true.
>
> This isn't a major change, really and it's only going to make things
> better (We didn't use to support -O2 -g at all, really, and now we can.
> There can't be any regressions from an unsupported state to a
> supported one). It's also not an optimization pass, so the risk is
> relatively low.
Well, FWIW I'd like to see this included. Josef, do you have any
interest in submiting it for 3.4, to see what reaction it gets at least?
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer