delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/04/25/04:46:24

Date: Tue, 25 Apr 2000 11:25:19 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Dennis Yelle <dennis51 AT jps DOT net>
cc: djgpp AT delorie DOT com
Subject: Re: gdb problem or just silly me - please help
In-Reply-To: <39047BEE.306C88F@jps.net>
Message-ID: <Pine.SUN.3.91.1000425112446.23128H-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Mon, 24 Apr 2000, Dennis Yelle wrote:

> Eli Zaretskii wrote:
> > 
> > On Thu, 2 Mar 2000, leon wrote:

That's quite a lot of time to reply to a thread ;-)

> > This is in the FAQ (sections 12.1 and 12.6).  In a nutshell, you need
> > to build your program with the -gstabs+ switch instead of -g.
> 
> I really think that this information should be in the readme.1st file.

How large do you want README.1ST to be?

That file is meant to get new users started.  It is not meant to
include every subtle aspect of using the software.

> Why even support the -g option if it is not usable?

The -g options *is* usable, except in some specific cases such as the
one which triggered this thread.  For example, if you debug C
programs, you will almost never need -gstabs+.

The problem with using -gstabs+ by default is that SYMIFY doesn't
support stabs, so -gstabs+ renders stack tracebacks unusable, unless
you run the program inside GDB or RHIDE.

If and when someone teaches SYMIFY about stabs, DJGPP will probably
switch to -gstabs+ as the default.

> I myself have already completely given up trying to use gdb.
> It just never seems to work right

It works just fine for me.

If you care to tell what are your problems with GDB, perhaps we could
help.  Heck, I might even get some changes into the next GDB version
(which is very near its release).

> I find that debugging with printf() is not too bad,

There's nothing wrong with printf debugging; I use it myself from time
to time.  But some complex bugs are simply impossible to find without
a powerful debugger such as GDB.  I guess you haven't met such bugs
yet (lucky you ;-).

- Raw text -


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