This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Still cannot print variable
Konstantin Karganov wrote:
> Hello JS,
>
>> I run "gdb test" followed by "print d" and then I get this error:
>
>> No symbol "d" in current context.
>
>> Why is it not possible to see the contents of "d" when debugging?
>
> Because you are not yet debugging!
> As described above, you started the debugger but not started the
> program being debugged.
> 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.
I have tried the different print arguments:
x
d
u
o
etc. but nothig seems to print 119.