GDB interactions with GCC
Daniel Jacobowitz
drow@false.org
Tue Nov 3 18:01:00 GMT 2009
On Tue, Nov 03, 2009 at 12:54:54PM -0500, Jean Christophe Beyler wrote:
> On my architecture, I can have the code for foo reduced to :
>
> add FirstInputRegister, FirstInputRegister, 1
> call bar
> branch return.
>
> Therefore, once I'm in bar, the input register that foo had has been
> lost since it's been incremented. The original value of a has been
> lost since it is not in a particular register, was not spilled.
>
> In this case, how does GDB handle it ?
GDB will report that the value is not available. If you compile
without optimization, GCC will generally save it in a stack slot, and
the value will be available.
--
Daniel Jacobowitz
CodeSourcery
More information about the Gdb
mailing list