This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Still cannot print variable
- From: JS <fedevaps at yahoo dot dk>
- To: gdb at sources dot redhat dot com
- Date: Fri, 15 Apr 2005 11:09:09 +0200
- Subject: Still cannot print variable
- Reply-to: fedevaps at yahoo dot dk
I am still have problems printing a variable. I have this code in a file
called test.:
int main()
{
int d = 119;
return(0);
}
I then compile it like this:
gcc -g -Wall -o test test.c
(I have also tried with option -O0 but that changes nothing).
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?