a debugging question

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.
 
R

red floyd

a_linux_user said:
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.

Not here, but the people in gnu.g++.help should be able to.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,162
Latest member
GertrudeMa
Top