This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix problem with scope.exp test, skipping past init0 call
- From: Fred Fish <fnf at specifix dot com>
- To: Daniel Jacobowitz <drow at false dot org>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 13 Feb 2006 10:47:30 -0500
- Subject: Re: [PATCH] Fix problem with scope.exp test, skipping past init0 call
- References: <200602121510.01657.fnf@specifix.com> <20060213153903.GA26349@nevyn.them.org>
- Reply-to: fnf at specifix dot com
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.
> 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
While older gcc's generate a prologue that
gdb understands, like:
main:
pushl %ebp
movl %esp, %ebp
subl $8, %esp
andl $-16, %esp
movl $0, %eax
addl $15, %eax
addl $15, %eax
shrl $4, %eax
sall $4, %eax
subl %eax, %esp
call foo
So when compiling with the latest gcc, gdb will set a function
breakpoint at the same address as main.
I was just reviewing the mailing lists to see if anyone else has
reported this, or is working on it, before doing any work on
i386_analyze_frame_setup().
-Fred