* debuggin problems
@ 2002-10-22 6:22 Israel Fdez Cabrera
2002-10-22 7:28 ` Daniel Jacobowitz
0 siblings, 1 reply; 2+ messages in thread
From: Israel Fdez Cabrera @ 2002-10-22 6:22 UTC (permalink / raw)
To: gdb
Hi, I'm new in the list and I subscribed because I have problems debugging
with gdb.
I recently upgrade my system from RedHat 7.3 to RedHat 8.0, I use KDevelop to
work. The new release of RedHat Linux comes with gcc 3.2 and gdb 5.2.1-4.
I notice that when I debugg a C++ code like this:
#include <iostream>
#include <fstream>
using namespace std;
int main (...){
...
ifstream f ("/root/install.log");
char s [255] = {0};
while ( ! f.eof () ){
f.getline (s, 255);
cout << s << endl;
}
...
return 0;
}
My system turns very slow, I can't even move the mouse, and once I got a
message that the system has low memory.
If I change it by it C equivalent, like the one above and debugg:
#include <stdlib.h>
#include <stdio.h>
int main (...){
...
FILE *f = fopen ("/root/install.log", "r");
char s [255] = {0};
fread (s, 255, 1, f);
printf ("%s", s);
...
return 0;
}
everything goes fine...
is there any problem with gdb, gcc or the C++ std lib???
best reg@rds
Israel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: debuggin problems
2002-10-22 6:22 debuggin problems Israel Fdez Cabrera
@ 2002-10-22 7:28 ` Daniel Jacobowitz
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2002-10-22 7:28 UTC (permalink / raw)
To: Israel Fdez Cabrera; +Cc: gdb
On Tue, Oct 22, 2002 at 09:20:15AM -0400, Israel Fdez Cabrera wrote:
> Hi, I'm new in the list and I subscribed because I have problems debugging
> with gdb.
> I recently upgrade my system from RedHat 7.3 to RedHat 8.0, I use KDevelop to
> work. The new release of RedHat Linux comes with gcc 3.2 and gdb 5.2.1-4.
> I notice that when I debugg a C++ code like this:
>
> #include <iostream>
> #include <fstream>
>
> using namespace std;
>
> int main (...){
> ...
> ifstream f ("/root/install.log");
> char s [255] = {0};
> while ( ! f.eof () ){
> f.getline (s, 255);
> cout << s << endl;
> }
> ...
> return 0;
> }
>
> My system turns very slow, I can't even move the mouse, and once I got a
> message that the system has low memory.
Well, C++ takes more memory, but it shouldn't be that much more - how
much memory do you have, anyway? What are you doing in the debugger?
C++ debugging for GCC 3.2 isn't working perfectly, but most things
should work.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-10-22 14:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-22 6:22 debuggin problems Israel Fdez Cabrera
2002-10-22 7:28 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox