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: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: fnf at specifix dot com
- Cc: gdb-patches at sourceware dot org
- Date: Sat, 13 May 2006 11:28:01 +0200 (CEST)
- Subject: Re: [RFA] Patch to skip_prologue_using_sal() for oneline stub functions
- References: <200605101113.50267.fnf@specifix.com>
> From: Fred Fish <fnf@specifix.com>
> Date: Wed, 10 May 2006 11:13:50 -0400
>
> 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.
Hmm, this is not what the mips_skip_prologue() does. If you return
START_PC, it will use *that* as the ed of the prologue. But this
probably is a good thing since we really want to avoid running the
architecture-specific prologue scanner if we can.
That said, how does this handle functions like:
void
foo(void)
{
}
or
void
foo (void)
{
return;
}
Did you check that?