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

Jim Blandy
2006-05-10T22:22:06Z

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?