[6.2] PROBLEMS file

H. J. Lu hjl@lucon.org
Thu Jul 22 21:38:00 GMT 2004


On Thu, Jul 22, 2004 at 10:51:48PM +0200, Mark Kettenis wrote:
>    Date: Wed, 21 Jul 2004 14:16:32 -0700
>    From: "H. J. Lu" <hjl@lucon.org>
> 
>    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.
> 
> Which contradicts the optional nature of %ebp as a frame pointer.  So
> the standard contradicts itself.  Anyway, in practice the %ebp == 0
> condition is useless.

Not at all. Standard is quite clear to me. According to i386 psABI,
%ebp has to be preserved for the caller. If the first instruction of a
function in an ABI compliant application is to clear %ebp, it must be
marking the deepest stack frame.

But I can be convinced if you can show me an example otherwise.


H.J.



More information about the Gdb mailing list