Hi All
I wrote a small sample program for testing GDB in linux.
The code is:
I put break point at fun() and try to print out value of x using:Code:#include<stdio.h> void fun() { int x=20; printf("\n Inside Fun"); } int main() { int x=10; printf("\n In main \n"); fun(); // Put Break point here }
But it give me error that:print x
Can any body help me in this. I am using Ubuntu.No symbol "x" in current context.
Thanks