A
a_linux_user
I have compiled a program with -g option with gcc, but I am almost
unable to debug it. For most variables, it does not allow me to print
their values while debugging. Could someone tell me what compile
options I have to use or how I should call gdb (if any special flags I
have to use). I have used gdb a lot a few years ago, and I never had
this problem.
It is a small program so today I used the time tested method of
debugging - add lots of print statements - but I hope someone will
suggest a better way.
Thanks.
unable to debug it. For most variables, it does not allow me to print
their values while debugging. Could someone tell me what compile
options I have to use or how I should call gdb (if any special flags I
have to use). I have used gdb a lot a few years ago, and I never had
this problem.
It is a small program so today I used the time tested method of
debugging - add lots of print statements - but I hope someone will
suggest a better way.
Thanks.