From owner-freebsd-hackers Fri Aug 2 11: 2:32 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 35E5E37B400 for ; Fri, 2 Aug 2002 11:02:29 -0700 (PDT) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id EFBD843E72 for ; Fri, 2 Aug 2002 11:02:27 -0700 (PDT) (envelope-from marck@rinet.ru) Received: from localhost (marck@localhost) by woozle.rinet.ru (8.11.6/8.11.6) with ESMTP id g72I2LC97419; Fri, 2 Aug 2002 22:02:25 +0400 (MSD) (envelope-from marck@rinet.ru) Date: Fri, 2 Aug 2002 22:02:21 +0400 (MSD) From: Dmitry Morozovsky To: Terry Lambert Cc: hackers@freebsd.org Subject: Re: -fomit-frame-pointer for the world build In-Reply-To: <3D4AC526.4CD399B3@mindspring.com> Message-ID: <20020802215736.F97319-100000@woozle.rinet.ru> X-NCC-RegID: ru.rinet MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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