This is the mail archive of the gdb@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: Frame lost after 'leave' and before 'ret' instruction on i386?


On Fri, May 16, 2008 at 01:28:50PM -0400, Aleksandar Ristovski wrote:
> Out of curiosity: what is the problem with specifying epilogue? Am I
> wrong when I say that there can be only so many epilogue types
> (i.e. compiler will not generate infinite number of epilogues)?

Any time the epilogue is multi-instruction, the compiler is free to
schedule instructions in the middle of it, and GCC does.  Plus it
varies based on the size of the stack frame.  On some platforms an
epilogue is hard to distinguish from an indirect function call.
Sibling calls have mini-epilogues in front of them, too.  And there
can be lots of copies of the epilogue, and they don't have to be at
the end of the function; they can be inlined at return sites.

So yes, it's a little harder than that :-)

-- 
Daniel Jacobowitz
CodeSourcery


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