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


That is what I noticed as well. So you have confirmed that if we want
to retain that information, it needs to be stored on the stack even if
the optimization levels are used.

Thanks,
Jc

On Tue, Nov 3, 2009 at 1:01 PM, Daniel Jacobowitz <drow@false.org> wrote:
> 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]