Mail Archives: djgpp/1997/09/23/23:25:22
At 01:52 9/18/1997 +0200, Vik Heyndrickx wrote:
>Shawn Hargreaves wrote:
>
>...
>> the parameters and local variables are accessed relative to this. The
>> main advantage to this is that the return address will always be at a
>> fixed offset from %ebp, and the version of %ebp from the previous
>> function will be pushed directly after this, so it is easy for debuggers
>> and programs like symify to walk backwards up the callstack.
>
>Does this then mean that program's compiled with the
>-fomit-frame-pointer option, that access local variables directly
>relative to %esp can yield problems with symify?
Yes. Basically -fomit-frame-pointer will make backtraces, and just about any
debugging whatever, impossible. The GCC docs warn about this. Moral: Don't
compile with -fomit-frame-pointer until the code is completely debugged
(what a laugh).
Nate Eldredge
eldredge AT ap DOT net
- Raw text -