On Fri, 2 Aug 2002, Terry Lambert wrote:

TL> > What are the drawbacks of building FreeBSD with -fomit-frame-pointer? As
TL> > far as I can see, it saves both space (which is not as worth as disk space
TL> > got cheaper and cheaper) and execution time (which is, AFAICC, more
TL> > important).
TL> >
TL> > I'd already done some tests, but not really deep.
TL> >
TL> > Would you please clarify this issue abit, or point me to any articles
TL> > describing exact -fomit-frame-pointer behaviour?
TL>
TL> The frame pointer is used for debugging, specifically for the
TL> stack traceback function to know arguments.  Removing it means
TL> losing some debugging functionality.  Next time try "info gcc":
TL>
TL> `-fomit-frame-pointer'
TL>      Don't keep the frame pointer in a register for functions that
TL>      don't need one.  This avoids the instructions to save, set up and
TL>      restore frame pointers; it also makes an extra register available
TL>      in many functions.  *It also makes debugging impossible on some
TL>      machines.*
TL>
TL>      On some machines, such as the Vax, this flag has no effect, because
TL>      the standard calling sequence automatically handles the frame
TL>      pointer and nothing is saved by pretending it doesn't exist.  The
TL>      machine-description macro `FRAME_POINTER_REQUIRED' controls
TL>      whether a target machine supports this flag.  *Note Registers::.

Yes, Terry, I'd read this note. However, it does not clarify for me which
exactly functionality is lost with omitting this.

I tried to build some binaries with -fomit..., then tried to debug it a
bit, and gdb shows me both backtrace stack and arguments, so I was in
doubt a bit -- so here is my question ;-)

Sincerely,
D.Marck                                   [DM5020, DM268-RIPE, DM3-RIPN]
------------------------------------------------------------------------
*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- [EMAIL PROTECTED] ***
------------------------------------------------------------------------


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to