Still cannot print variable

JS fedevaps@yahoo.dk
Fri Apr 15 10:22:00 GMT 2005


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 :-)



More information about the Gdb mailing list