www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/23/23:25:22

Date: Tue, 23 Sep 1997 20:23:43 -0700 (PDT)
Message-Id: <199709240323.UAA02040@adit.ap.net>
Mime-Version: 1.0
To: Vik Heyndrickx <Vik DOT Heyndrickx AT rug DOT ac DOT be>, djgpp AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: Asm Question

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019