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 10:47:30AM -0500, Fred Fish 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.

Hmm, many arches other than i386 are more trusting of line information
than i386 is - but we've historically had some problems with bad
versions of gcc there so it's understandable.

> 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

Ahh - your GCC has unaligned stack support for main.  Not surprising
that GDB can't handle this; it's clever, and fresh off the presses.

-- 
Daniel Jacobowitz
CodeSourcery


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