This is the mail archive of the gdb-patches@sourceware.org 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: [unavailable regs/locals, 0/11] Introduction


On Wednesday 23 February 2011 21:42:59, Mark Kettenis wrote:
> > From: Pedro Alves <pedro@codesourcery.com>
> > Date: Tue, 22 Feb 2011 13:37:58 +0000
> > 
> > On Tuesday 22 February 2011 13:27:22, Pedro Alves wrote:
> > > Tested on x86_64-linux, native and gdbserver.  No
> > > regressions, and the new tests pass cleanly.
> > 
> > ... and it goes without saying:
> > 
> > I'd appreciate comments and extra eyeballs on all of this.
> > Pending objections, I'd like to commit after a reasonable wait.
> 
> Pedro, I haven't looked very closely at the code yet, but I have a few
> worries.  The GCC debug information tends to underspecify the saved
> registers in the unwind info.  The unwinder code deals with
> "unspecified"[1] registers by assuming they have the same value as in the
> "inner" frame.  How does your new code treat such "unspecified"
> registers?
> 
> [1] "unspecified" is different from "undefined"

My changes related to unavailable register values,
as in their register/memory 's contents not having
been collected by a given tracepoint/traceframe.  This
is ortogonal from unspecified/undefined in debug info.
There's sort of a run-time vs compile-time distinction.
The unavailable-less I've been talking about is of
the run-time kind.  unspecified/undefined is of the
compile-time kind.
If the unwinder assumes an unspecified register has the
same value as in the inner frame, it will continue to do so.
Only when the register value is actually read from the
stack or the register cache, is it determined to be
unavailable/uncollected, and the struct value marked
accordingly.  In the unspecified case, if the register
value is available in the next frame (because enough stack
has been collected to cover the next frame, say), it'll
be available in the this frame too.  If it's unavailable
in the next frame (because not enough stack had been
collected to cover that particular register, that was
saved last in the stack, say), it'll be unavailable
in the this frame too.  (If anything tries to get
at an unavailable value's contents, and exception is
thrown.)

-- 
Pedro Alves


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