Incomplete backtraces

Stephen Tether tether at slac.stanford.edu
Sun Nov 17 08:53:09 UTC 2013


On 11/14/13 8:56 PM, Mohammed Khoory wrote:
> 
> For example, if Init() calls function1(), which calls function2(), which
> calls function3(), and a breakpoint is placed in function3(), then when the
> debugger pauses the program the stack trace only shows function3() and
> function2(), and nothing under that. 
> 

I'm not familiar with the SPARC but it sounds as if you need to read the
description of the GCC option -fomit-frame-pointers. Frame pointers are
used to chain call stacks together but some forms of optimization
prevent them from being used. For example they're often omitted in
functions that call no other functions, so-called "leaf" functions.
Alas, omitting frame pointers can make complete backtrace listings
impossible. You can try using -fno-omit-frame-pointers after specifying
the optimization level.

- Steve Tether
SLAC



More information about the users mailing list