Mail Archives: djgpp/2001/04/08/15:30:11
Message-ID: | <3AD0B992.44D0D3C3@jps.net>
|
From: | Dennis Yelle <dennis51 AT jps DOT net>
|
X-Mailer: | Mozilla 4.75 [en] (Win98; U)
|
X-Accept-Language: | en
|
MIME-Version: | 1.0
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | gdb still doesn't work for me
|
Lines: | 77
|
Date: | Sun, 08 Apr 2001 12:18:42 -0700
|
NNTP-Posting-Host: | 216.119.17.130
|
X-Complaints-To: | abuse AT onemain DOT com
|
X-Trace: | nntp3.onemain.com 986757223 216.119.17.130 (Sun, 08 Apr 2001 15:13:43 EDT)
|
NNTP-Posting-Date: | Sun, 08 Apr 2001 15:13:43 EDT
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
I have been using the DJGPP C++ compiler for some time now.
I like it a lot.
But I have never been able to get gdb to work properly for me.
Does anyone actually use it?
Yesterday, I noticed that there was a new version of gdb available,
so I used the zip picker to select the whole package
of files and downloaded and installed them.
The compiler works fine, but still gdb fails me.
It seems to work a little better than before, so
I started experimenting with it.
I have a program that is only one file, about 560 lines long,
plus the included standard headers.
I compiled it with this:
redir -eo -t gxx -g -Os -Wall test.cpp -o test.exe
I got no errors and no warnings.
I ran the program, like this:
test > z
It finished in less than 1 second.
I ran gdb like this:
gdb test.exe
break main
n
n
n
n
n
n
n
At this point, the program produces about 64 lines of
output to the screen, but I noticed a significant pause
every 4th line. The total of all of the pauses was
far more than 1 second. So, it seems to me that the
program is running significantly slower under gdb than
when run alone.
Then I typed:
n
At this point the program produced two lines of output
to the screen, and then started "running" very slowly.
Is it a known problem that programs run very slowly when
run under gdb?
I tried to simplify the problem in several ways:
1. The program contains about 50 lines that have been
"commented out" with
#if 0
// ...
#endif
If I completely remove most of those lines from the program,
the problem goes away.
Does gdb have problems with programs that are more than
512 lines long?
2. I removed the -Os from the compile line.
The problem went away.
Does gdb have problems with -Os ?
If anyone wants to try to reproduce this problem on another
machine, the source for the program is here:
http://www2.jps.net/~vert/test.cpp
the short input file named 'in' is here:
http://www2.jps.net/~vert/in
Thank you all for any help you can give me about this problem.
Dennis Yelle
--
I am a computer programmer and I am looking for a job.
There is a link to my resume here:
http://table.jps.net/~vert/
- Raw text -