Still cannot print variable

Konstantin Karganov kostik@ispras.ru
Fri Apr 15 10:11:00 GMT 2005


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.

-- 
Best regards,
 Konstantin 





More information about the Gdb mailing list