This is the mail archive of the gdb@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: Frame unwind and the sentinal frame.


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


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