This is the mail archive of the gdb@sourceware.org mailing list for the GDB 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: GDB interactions with GCC


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


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