Date: Sun, 18 Jul 1999 11:32:27 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Richard Dawe cc: DJGPP newsgroup Subject: Re: Bizarre debugging format problem In-Reply-To: <3790702E.3248DE09@tudor21.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk 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.