delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/12/26/09:26:03

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f
Date: Wed, 26 Dec 2001 16:23:38 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
Message-Id: <1858-Wed26Dec2001162338+0200-eliz@is.elta.co.il>
X-Mailer: emacs 21.1.50 (via feedmail 8 I) and Blat ver 1.8.9
CC: djgpp-workers AT delorie DOT com
In-reply-to: <3C29C648.87B6170C@phekda.freeserve.co.uk> (message from Richard
Dawe on Wed, 26 Dec 2001 12:44:56 +0000)
Subject: Re: gcc 3.0.2 and -ggdb debugging info
References: <3C227C35 DOT 8DC5059 AT phekda DOT freeserve DOT co DOT uk> <3C25C254 DOT 2F6BC615 AT is DOT elta DOT co DOT il> <3C29C648 DOT 87B6170C AT phekda DOT freeserve DOT co DOT uk>
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> Date: Wed, 26 Dec 2001 12:44:56 +0000
> From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
> 
> I also tried to reproduce the problem using a simple case. The archive
> contains this simple case in simple/. I built objects with -gstabs+ and
> -ggdb3 and linked as plain objects and as libraries. I thought perhaps
> binutils had stomped on the objects, when constructing libzippo, as part
> of the zippo build process. Unfortunately the simple case shows no
> difference between -gstabs+ and -ggdb3.

It seems that -ggdb now means -gdwarf-2, i.e. the default
GDB-friendly debug format is DWARF2.  That's what the "info source"
GDB command tells me when I debug the ``simple'' program compiled
with -ggdb3 using GCC 3.0.2.

Andris, is that correct?  If so, I think this change was a bit
premature.  The problem is that, currently, the DJGPP port of GDB
groks DWARF2 only in GDB 5.1, so users will not be able to use -ggdb
until the ported GDB 5.1 is released.

This is, of course, your problem, Richard: your version of GDB
doesn't know about DWARF2.  So you must either download the GDB
sources from the GNU FTP site and build it (it should build with
DJGPP right out of the box, if you follow the instructions in the
djgpp/README file), or use -gstabs+.

(I probably won't release a port of GDB 5.1, but will wait a bit until
v5.1.1 is released.  That's because v5.1 has a few nasty problems in
C++ debugging, so I don't want to release a buggy version.)

But I also see another possible problem with your system
configuration: when I type "gdb zippo-ggdb3.exe", GDB 5.1 complains
thusly:

  Dwarf Error: wrong version in compilation unit header

So I suspect that either your GCC or Binutils version is not the
latest one, and you have some bug in generating the DWARF2 debug info.
Please see if you need to upgrade any of these two packages.

- Raw text -


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