This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

debuggin problems


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]