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: Previous frame identical to this frame (corrupt stack?)


> From: "Michael Snyder" <msnyder@specifix.com>
> Date: Wed, 05 Mar 2008 12:42:05 -0800
> 
> On Wed, 2008-03-05 at 08:36 -0800, Guillaume MENANT wrote:
> > What does it means ? What have I to look at in order to check if I have an
> > mistake in my program ?
> 
> In practice, the most frequent case where I have seen
> this message is when we really have reached the end
> of the stack.  Usually the bottom frame is some sort
> of thread creation function, possibly in the kernel
> or in some thread library.  In this context, what
> has usually happened is that the author of the thread
> creation function has not bothered to set up some 
> sort of initial "zero" stack pointer so that the 
> debugger can detect the end of the stack.

Or that the GDB target does not bother to check for that condition.  Some
thread libraries actually do bother to set up the stack in a way that makes
it possible to detect the end of the stack, but GDB simply doesn't have the
code to detect this.

And on open source operating systems we could make sure that the
thread creation function has a unique name and check for that much like we
terminate the stack trace as we do for main().

But apparently people are not annoyed enough with seeing this message
to write the actual code ;).

Mark


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