delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/07/18/04:34:55

Date: Sun, 18 Jul 1999 11:32:27 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Richard Dawe <richdawe AT bigfoot DOT com>
cc: DJGPP newsgroup <djgpp AT delorie DOT com>
Subject: Re: Bizarre debugging format problem
In-Reply-To: <3790702E.3248DE09@tudor21.net>
Message-ID: <Pine.SUN.3.91.990718113123.19517V-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sat, 17 Jul 1999, Richard Dawe wrote:

> I compiled & linked with
> gcc's -g flag, but gdb could not find the line number information for any
> of the functions. I tried changing -g to -g3, but this made no difference.
> Trying -ggdb allowed me to do 'l main' and similar successfully. Why is
> this?

(Sorry for going over trivia, but just in case...)

Was the problem with the functions in your main program, or in the
libraries you linked in?  If the latter, you need to build the
libraries with -g as well.

Also, GDB needs to be told where to find the sources, for some
source-oriented operations.  If the sources are not in the directory
where you run GDB, use the "dir" command to add the source directories
to the list of directories GDB searches for sources.

If the above doesn't help, look in the DJGPP FAQ list, sections 12.6
to 12.9, for some problems which stem from limitations of the COFF
debugging info.  If your problem seems to be one of those, try
compiling with -gstabs+, as the FAQ suggests.

Failing all that, describe here what commands did you use inside GDB
and how exactly did they fail to produce the desired effect.  It would
be nice if you could post the source of the shortest complete program
that fails in the same way, so that somebody could compile it and dig
into this problem.

- Raw text -


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