www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/01/03/19:30:49

Date: Wed, 03 Jan 1996 19:25:58 -0500 (EST)
From: Denis P Dersarkisian <denis AT oitunix DOT oit DOT umass DOT edu>
Subject: debuggers/symify match wrong files to source lines
To: djgpp AT sun DOT soe DOT clarkson DOT edu

    Hey everyone.  I'm debugging a program that's compiled from two source
files: test.h (which contains function prototypes and class definitions)
and test.cc (containing main() and the non-inline methods for the classes
defined in test.h.)  When I use a debugger to step through an inline method
whose code is in the test.h file, it shows me the corresponding source lines
from the test2.cc file.  For example, if the method I'm stepping through
is on lines 170-175 of test.h, I see whatever code is on lines 170-175 of
test2.cc instead.  I have the same problem when I use symify to get the source
lines of where my program crashed... it shows the correct line number but the
wrong source file (test.cc) when the crash has occured executing code from
test.h.  I fixed this problem by moving every method to test2.cc, but I'm
wondering if there's any way to compile the program so that debuggers/symify
can match filenames to source lines correctly.  (I compiled the program using
the compiler's -g option.)  Any help's appreciated.
-Denis

- Raw text -


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