This is the mail archive of the gdb-patches@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: [PATCH] Fix problem with scope.exp test, skipping past init0 call


> From: Fred Fish <fnf@specifix.com>
> Date: Mon, 13 Feb 2006 10:47:30 -0500
> 
> On Monday 13 February 2006 10:39, Daniel Jacobowitz wrote:
> > What platform and compiler version is this?  It doesn't fail for me.
> 
> Fedora Core 4, using the latest development gcc while running the]
> gdb testsuite.

Hmm, if you didn't commit the fix yet, can you please hold off doing
that for a bit?  From your explanation below, it turns out that this
might have caught a genuine genuine GDB bug.  By "fixing" this we're
likely not to notice that.  And if this would have been a GCC bug that
would have been fixed in the official release, there would have been
no reason to have added a workaround either.

> > Well, that's supposed to skip a call to __main(), which GCC generates
> > on very few platforms... stopping at the opening brace is definitely
> > a bug in its own right, in the debug info or in the prologue skipper.
> 
> The problem is that gcc now generates prologues that the prologue skipper
> isn't prepared to handle.
> 
> The latest gcc generates prologues like:
> 
> main:
>         leal    4(%esp), %ecx
>         andl    $-16, %esp
>         pushl   -4(%ecx)
>         pushl   %ebp
>         movl    %esp, %ebp
>         pushl   %ecx
>         call    foo

Hmm, what's happening here?  Looks like the first three instructions
are aligning the stack on a 16-byte boundary.  Why is GCC doing that?

Mark


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