6.16 gcc omit-frame pointer

David Jensen djensenlin at windstream.net
Wed Dec 1 08:47:32 PST 2010


On Tue, 30 Nov 2010 22:59:35 -0600
Stuart Stegall <keltor at keltor.org> wrote:

> On Mon, Nov 29, 2010 at 11:09 AM, David Jensen
> <djensenlin at windstream.net> wrote:
> > Note: Section 5.10, “GCC-4.5.1 - Pass 2” does not use a case
> > statement for the frame-pointer. Problematic for x86_64?  Perhaps
> > both sections should be:
> >
> 
> gdb on AMD64 uses stack unwind instead of the frame pointer.  The
> default on x86 is still to use the frame pointer.  The frame pointer
> is really unneeded unless you have a compiler that doesn't put enough
> stack info into the binaries.
> 
> http://www.yosefk.com/blog/getting-the-call-stack-without-a-frame-pointer.html
>  <<-- more than you ever wanted to know about the call stack, frame
> pointers, and unwind.
> 
> gcc-4.6 will make -fomit-frame-pointer the default on Linux/x86.

a fedora thread on debugging/profiling issues at:
http://lists.fedoraproject.org/pipermail/devel/2010-November/144952.html
but I am not, and I don't believe most LFS users are interested in
*system wide* debugging/profiling. Thus omitting the frame pointer
generally is a plus.

The point of the thread is that the 'chapter 5 gcc pass 2' and the
'chapter 6 gcc' instructions and explanations are inconsistent,
confusing and wrong for all but i?86.  Maybe even completely outdated.

---
David Jensen





More information about the lfs-dev mailing list