public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Frame unwind and the sentinal frame.
@ 2006-06-30 18:42 Paul Breed
  2006-06-30 19:05 ` Daniel Jacobowitz
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Breed @ 2006-06-30 18:42 UTC (permalink / raw)
  To: gdb

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,

I think this is called the sentinal frame?



Paul


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Frame unwind and the sentinal frame.
  2006-06-30 18:42 Frame unwind and the sentinal frame Paul Breed
@ 2006-06-30 19:05 ` Daniel Jacobowitz
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2006-06-30 19:05 UTC (permalink / raw)
  To: Paul Breed; +Cc: gdb

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-06-29  2:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-30 18:42 Frame unwind and the sentinal frame Paul Breed
2006-06-30 19:05 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).