[RFA] Patch to skip_prologue_using_sal() for oneline stub functions

Jim Blandy jimb@codesourcery.com
Wed May 10 22:22:00 GMT 2006


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?



More information about the Gdb-patches mailing list