This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Patch to skip_prologue_using_sal() for oneline stub functions
- From: Jim Blandy <jimb at codesourcery dot com>
- To: fnf at specifix dot com
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 10 May 2006 15:21:48 -0700
- Subject: Re: [RFA] Patch to skip_prologue_using_sal() for oneline stub functions
- References: <200605101113.50267.fnf@specifix.com>
Fred Fish <fnf@specifix.com> writes:
> If a function optimizes down to a single return instruction, there is
> no prologue, and skip_prologue_using_sal will return a PC that is
> probably the first instruction of the next following function. In
> this case, we want to return the start_pc, so that the caller will
> know that it needs to run the architecture specific prologue scanner
> to figure out what is going on.
>
> This fixes the following failures for MIPS:
>
> FAIL: gdb.base/break.exp: breakpoint small function, optimized file
> FAIL: gdb.base/break.exp: run until function breakpoint, optimized file
> FAIL: gdb.base/break.exp: run until breakpoint set at small function, optimized file
>
> -Fred
>
> ============================================================================
>
> 2006-05-10 Fred Fish <fnf@specifix.com>
>
> * symtab.c (skip_prologue_using_sal): Handle single line functions
> like "foo(){}", which may optimize down to a single return inst.
This looks reasonable; have you tested on IA-32, too?