[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.c++

a debugging question

a_linux_user

9/30/2008 7:17:00 PM

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.
3 Answers

red floyd

9/30/2008 7:34:00 PM

0

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

Victor Bazarov

9/30/2008 7:37:00 PM

0

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

Yes, somebody in the newsgroup 'gnu.gcc.help' could.

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

Somebody in the compiler newsgroup probably will, if you ask.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask

a_linux_user

9/30/2008 8:33:00 PM

0

Sorry about posting it here.

On Sep 30, 8:36 pm, Victor Bazarov <v.Abaza...@comAcast.net> wrote:
> a_linux_user wrote:
> > 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.
>
> Yes, somebody in the newsgroup 'gnu.gcc.help' could.
>
> > 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.
>
> Somebody in the compiler newsgroup probably will, if you ask.
>
> V
> --
> Please remove capital 'A's when replying by e-mail
> I do not respond to top-posted replies, please don't ask