This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


> 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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]