This is the mail archive of the gdb@sources.redhat.com 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: Re[2]: Still cannot print variable


Konstantin Karganov wrote:

> Hello JS,
> 
>>> Try this:
>>>  gdb test
>>>  break main            // to stop your program run
>>>  run
>>>  print d
>>> 
>> Ok now it work but when I write "print d" I get:
> 
>> $1 = 134513410
> 
>> But I declared d to be 119.
> Sure! Because you stand before the initialization.
> Try to do "step" or "next" and after that you'll see your variable
> initialized.
> 

Yes I just read Elis reply...should have done that before posting :-)


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