Frame unwind and the sentinal frame.
Daniel Jacobowitz
drow@false.org
Fri Jun 30 19:05:00 GMT 2006
On Wed, Jun 28, 2006 at 04:47:36PM -0700, Paul Breed wrote:
> I'm working on a GDB remote stub for the coldfire. (Think 68K)
>
> When the system does a bt (back trace )
> or an MI stack-info-depth
>
> It eventually walks off the end of the frames and generates an error message
>
> Previous frame inner to this frame (corrupt stack?)
>
> How is GDB supposed to detect the "Last" frame in the stack,
The right answer depends on your architecture: a NULL frame pointer, a
zero PC, or a function marked as an ELF entry point are all reasonable
choices. Then, of course, you have to make sure GDB agrees with you on
the proper convention. As you'll see in the list archives that can
sometimes be a bit iffy.
> I think this is called the sentinal frame?
No - that's at the other end of the stack, actually. It's more of a
GDB internal detail.
--
Daniel Jacobowitz
CodeSourcery
More information about the Gdb
mailing list