Mailinglist Archive: opensuse-programming (32 mails)
| < Previous | Next > |
[suse-programming-e] Re: [SLE] Debug C++
- From: Jesse Marlin <jlm@xxxxxxxxxxx>
- Date: Mon, 8 Jul 2002 14:56:49 -0400
- Message-id: <15657.57457.831430.804916@xxxxxxxxxxxxxxxx>
Setyo Nugroho writes:
> Hi John,
> No, init.c is not mentioned anywhere in the program.
>
> Even for a simple prog like below, I cannot display (list) the prog using
> gdb.
What version of gdb? I have had varying success with different 5.x
versions of gdb. 5.2 seems to be the best 5.x yet. A lot of the revamping
of gdb had to do with C++, so I would try downloading and recompiling
a newer version than the one you have. I think you can find them here:
ftp://ftp.gnu.org/gnu/gdb
We have a lot of problems with 5.x gdb on other architectures just using it
to debug C. We have had to stick with 4.17 on Sun, and 4.18 on Compaq just
to debug anything. The linux stuff seems to be half way decent.
> ----
> #include <iostream>
> class CSegiempat
> {
> int lebar, tinggi;
> public:
> CSegiempat (int,int);
> int luas (void) {return (lebar*tinggi);}
> };
>
> CSegiempat::CSegiempat(int a, int b)
> {
> lebar = a;
> tinggi = b;
> }
>
> int main ()
> {
> CSegiempat persegi1 (3,4);
> CSegiempat persegi2 (5,6);
> cout<<"luas persegi1 = "<<persegi1.luas()<<endl;
> cout<<"luas persegi2 = "<<persegi2.luas()<<endl;
> }
> ---------
>
> regards
> Setyo
>
>
>
> >
> > Subject: Re: [SLE] Debug C++
> > Date: Mon, 08 Jul 2002 18:14:36 +0000
> > From: John Lamb <J.D.Lamb@xxxxxxxxxxxxxx>
> > To: Setyo Nugroho <snugroho@xxxxxxx>
> > Cc: suse-programming-e@xxxxxxxx
> >
> > Setyo Nugroho wrote:
> > > Hi all,
> > > I have a problem to debug my C++ program. The error msg in gdb:
> > > "init.c: No such file or directory."
> > > I am not sure, whether it has to do with the recently installed Suse 8.
> > 0?
> >
> > (1) Message should really be posted to suse-programming-e
> >
> > (2) Can you post a fragment of source code? Is "init.c" mentioned
> > anywhere in the source?
> >
> > JDL
> >
> > --
> >
> Hi John,
> No, init.c is not mentioned anywhere in the program.
>
> Even for a simple prog like below, I cannot display (list) the prog using
> gdb.
What version of gdb? I have had varying success with different 5.x
versions of gdb. 5.2 seems to be the best 5.x yet. A lot of the revamping
of gdb had to do with C++, so I would try downloading and recompiling
a newer version than the one you have. I think you can find them here:
ftp://ftp.gnu.org/gnu/gdb
We have a lot of problems with 5.x gdb on other architectures just using it
to debug C. We have had to stick with 4.17 on Sun, and 4.18 on Compaq just
to debug anything. The linux stuff seems to be half way decent.
> ----
> #include <iostream>
> class CSegiempat
> {
> int lebar, tinggi;
> public:
> CSegiempat (int,int);
> int luas (void) {return (lebar*tinggi);}
> };
>
> CSegiempat::CSegiempat(int a, int b)
> {
> lebar = a;
> tinggi = b;
> }
>
> int main ()
> {
> CSegiempat persegi1 (3,4);
> CSegiempat persegi2 (5,6);
> cout<<"luas persegi1 = "<<persegi1.luas()<<endl;
> cout<<"luas persegi2 = "<<persegi2.luas()<<endl;
> }
> ---------
>
> regards
> Setyo
>
>
>
> >
> > Subject: Re: [SLE] Debug C++
> > Date: Mon, 08 Jul 2002 18:14:36 +0000
> > From: John Lamb <J.D.Lamb@xxxxxxxxxxxxxx>
> > To: Setyo Nugroho <snugroho@xxxxxxx>
> > Cc: suse-programming-e@xxxxxxxx
> >
> > Setyo Nugroho wrote:
> > > Hi all,
> > > I have a problem to debug my C++ program. The error msg in gdb:
> > > "init.c: No such file or directory."
> > > I am not sure, whether it has to do with the recently installed Suse 8.
> > 0?
> >
> > (1) Message should really be posted to suse-programming-e
> >
> > (2) Can you post a fragment of source code? Is "init.c" mentioned
> > anywhere in the source?
> >
> > JDL
> >
> > --
> >
| < Previous | Next > |