[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Automatic -fomit-frame-pointer usage



Hi,

On Friday 22 February 2008, Vincent Rivière wrote:
> The usage of the frame pointer (actually a6) allows gdb to determine
> precisely the call stack when a breakpoint is hit. It is very useful for
> debugging,

And for callgraphs which help a lot in both memory and performance
analysis. :-)

> that's why the frame pointer is always used when -O is not 
> used. When some level of optimization is used, it is very hard to use the
> debugger, because the instructions are usually reordered, most variable
> values are inaccessible because they are stored in registers.

FYI: GCC 4.x and later Gdb versions support locationlists which are supposed
to help with this.


> And without the frame pointer, it may be impossible to know from which
> functions we are called.


	- Eero