This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: [6.2] PROBLEMS file
On Wed, Jul 21, 2004 at 10:59:42PM +0200, Mark Kettenis wrote:
> Date: Mon, 19 Jul 2004 21:51:27 +0200
> From: "Eli Zaretskii" <eliz@gnu.org>
>
> > Date: Sun, 18 Jul 2004 23:25:19 -0400
> > From: Andrew Cagney <cagney@gnu.org>
> >
> > gdb/1505: [regression] gdb prints a bad backtrace for a thread
> >
> > When backtracing a thread, gdb does not stop when it reaches the
> > outermost frame, instead continuing until it hits garbage. This is
> > sensitive to the operating system and thread library.
>
> In most cases there is no way for GDB to tell what the outermost frame
> is. Some people think that %ebp == 0 or %eip == 0 serves as a marker,
> but they're mistaken. The usage as %ebp as a frame pointer is a
> software comvention which isn't mandated by the ABI. More and more
FYI, the i386 psABI, which is also used by the x86-64 psABI, says:
%ebp The content of this register is unspecified at process
initialization time, but the user code should mark the
deepest stack frame by setting the frame pointer to zero.
No other frame's %ebp should have a zero value.
H.J.