Re: gdb code review, pointer madness

Daniel Jacobowitz
2006-01-24T22:11:15Z

On Tue, Jan 24, 2006 at 03:57:10PM -0600, NZG wrote:
> 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?

Normally this means that the unwinder in the tdep file is failing to
stop in some case where it ought to.

When you first connect to a target, it is often in an ambiguous /
uninitialized state. It's pretty difficult to prevent GDB from reading
a certain amount of random memory if you ask for a backtrace when there
isn't a valid stack.

--
Daniel Jacobowitz
CodeSourcery