This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Turn on -fomit-frame-pointer by default for 32bit Linux/x86
- From: Michael Witten <mfwitten at gmail dot com>
- To: Andi Kleen <andi at firstfloor dot org>
- Cc: Uros Bizjak <ubizjak at gmail dot com>, GCC Development <gcc at gcc dot gnu dot org>, Richard Guenther <rguenther at suse dot de>, Jakub Jelinek <jakub at redhat dot com>, Mark Mitchell <mark at codesourcery dot com>, Richard Henderson <rth at redhat dot com>, jh at suse dot cz, "H.J. Lu" <hjl dot tools at gmail dot com>, Andrew Haley <aph at redhat dot com>, David Daney <ddaney at caviumnetworks dot com>, Xinliang David Li <davidxl at google dot com>, Chris Lattner <clattner at apple dot com>
- Date: Sun, 8 Aug 2010 12:00:47 -0500
- Subject: Re: Turn on -fomit-frame-pointer by default for 32bit Linux/x86
- References: <AANLkTikArg8jNfW-DZQQRf9Q97+ay4q2e8nW8W8--XuD@mail.gmail.com> <AANLkTimgyd1Hi7V0r7oQ23MEJ4zstaoC1gvgi5_AApHO@mail.gmail.com> <AANLkTim+RsVU983qExmKM987ZeXqmuc7BN=fXqX5pFkM@mail.gmail.com> <20100808153046.GA23786@basil.fritz.box>
On Sun, Aug 8, 2010 at 10:30, Andi Kleen <andi@firstfloor.org> wrote:
>> > I like backtraces.
>> >
>>
>> So, you will be able to use --enable-frame-pointer configure option.
>>
>> [1] http://gcc.gnu.org/ml/gcc-patches/2010-07/msg02034.html
>
> ... or use backtrace()
What kind of black magic would you expect backtrace() to use?
>From the `info backtrace' text:
Note that certain compiler optimizations
may interfere with obtaining a valid
backtrace. Function inlining causes
the inlined function to not have a stack
frame; tail call optimization replaces
one stack frame with another; frame pointer
elimination will stop `backtrace' from
interpreting the stack contents correctly.
Specifically, note the last sentence:
frame pointer elimination will stop `backtrace'
from interpreting the stack contents correctly.
Sincerely,
Michael Witten