This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: gdb code review, pointer madness
I think I'm getting ahead of myself and assuming too much.
I've bitten off a lot with this project and have a lot to learn yet.
First off, I think I'm getting confused between the innermost frame and the
sentinal frame, which I was originally assuming were one and the same.
Digging deeper, it appears that the "innermost frame" as referred to in the
comments is actually referring to frame 0, while the sentinal is frame -1.
Since my board is succesfully connecting and displaying the current frame, it
would seem that the sentinal fetch is working correctly.
The problem is that when I run a backtrace it fetches the innermost frame, and
then starts fetching garbage infinitely (get_prev_frame never returns NULL).
I'm trying to wade through the code to figure out why this is happening, but
it's taking a while, function calls here are very, very deep.
In general, should this information (get_prev_frame=NULL) be coming from the
target? Or should the host know this based on the id number?
If I'm asking the wrong list please point me the right direction, this seemed
the closest to a developer list out of the choices.
thx,
NZG
On Tuesday 24 January 2006 3:27 pm, Jim Blandy wrote:
> On 1/24/06, NZG <ngustavson@emacinc.com> wrote:
> > Looks like this particular flaw is an optimization trick, digging down
> > farther the correct pointer does appear to get there.
> >
> > Something is wrong with the frame call on the sential frame (because it
> > crashes the debugger) but this is not it.
>
> Well, if you are able to come up with some reproduction instructions
> that don't require exotic hardware, let us know.
>
> The sentinel frame should be very simple to deal with: "unwinding" a
> register from the sentinel frame simply returns its current value from
> the chip. If you're not getting the current registers' values unwound
> from the sentinel frame, then GDB simply isn't getting the register
> values right; you'll need to look at the communication between GDB and
> the board.