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


On Mon, Feb 13, 2006 at 05:04:49PM +0100, Mark Kettenis wrote:
> > > 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?

In case the system runtime doesn't (which some older glibc crt files
didn't, or maybe it's kernel dependent, or something like that that's
hard to handle when configuring GCC).  You need the 16-byte alignment
for SSE2, I think?

-- 
Daniel Jacobowitz
CodeSourcery


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