This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Turn on -fomit-frame-pointer by default for 32bit Linux/x86


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]