Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Israel Fdez Cabrera <israel@seg.inf.cu>
To: gdb@sources.redhat.com
Subject: debuggin problems
Date: Tue, 22 Oct 2002 06:22:00 -0000	[thread overview]
Message-ID: <200210220920.15492.israel@seg.inf.cu> (raw)

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


             reply	other threads:[~2002-10-22 13:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-22  6:22 Israel Fdez Cabrera [this message]
2002-10-22  7:28 ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200210220920.15492.israel@seg.inf.cu \
    --to=israel@seg.inf.cu \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox