Date: Fri, 2 Aug 2002 22:02:21 +0400 (MSD) From: Dmitry Morozovsky <marck@rinet.ru> To: Terry Lambert <tlambert2@mindspring.com> Cc: hackers@freebsd.org Subject: Re: -fomit-frame-pointer for the world build Message-ID: <20020802215736.F97319-100000@woozle.rinet.ru> In-Reply-To: <3D4AC526.4CD399B3@mindspring.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 --- marck@rinet.ru *** ------------------------------------------------------------------------ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020802215736.F97319-100000>