delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/04/10/07:30:14

From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: gdb still doesn't work for me
Date: 10 Apr 2001 11:28:16 GMT
Organization: Aachen University of Technology (RWTH)
Lines: 38
Message-ID: <9auqog$6ah$1@nets3.rz.RWTH-Aachen.DE>
References: <3AD0B992 DOT 44D0D3C3 AT jps DOT net> <4634-Sun08Apr2001234906+0300-eliz AT is DOT elta DOT co DOT il> <3AD10B71 DOT 9019CC9 AT jps DOT net> <3AD1E414 DOT 8D811D08 AT jps DOT net>
NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de
X-Trace: nets3.rz.RWTH-Aachen.DE 986902096 6481 137.226.32.75 (10 Apr 2001 11:28:16 GMT)
X-Complaints-To: abuse AT rwth-aachen DOT de
NNTP-Posting-Date: 10 Apr 2001 11:28:16 GMT
Originator: broeker@
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Dennis Yelle <dennis51 AT jps DOT net> wrote:
[...]

> My programs usually take at least 20 times as long to run when I run
> them under gdb rather than directly from the command line.  Is this
> normal behavior for gdb?

Definitely not.

I have one suspicion regarding a possible reason: you're not using
-gstabs, and you're compiling C++ code. That's not a very good
combination, generally. The difference in format of debugging
information might cause GDB to be very slow at finding the source line
corresponding to a particular program counter register value.

> What is going on here?  Does gdb ever work right?

You're overreacting a bit, I think. Just because it seems to be a bit
slower than you expect doesn't mean it's not working correctly.

To give it a fair chance, you also should not be testing the program
in single-step mode. Try

	gdb test.exe
	gdb > run

or

	gdb test.exe
	gdb > b main
	gdb > run
	gdb > continue

for a change.

-- 
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019