dbx screwing up...
Michael Meissner
meissner at tiktok.dg.com
Wed May 17 08:07:25 AEST 1989
In article <14490 at duke.cs.duke.edu> apte at helios.UUCP (Jitendra Apte) writes:
| In article <1666 at eric.mpr.ca> parker at waters.mpr.ca (Ross Parker) writes:
| >
| >We have seen a bizarre problem with dbx when trying to debug a very large
| >(tens of thousands of lines) application. This is Ultrix 2.2 on a
| >Microvax II. The problem is that when a breakpoint is set in a particular
| >function (i.e. 'stop in functionname'), the source displayed with 'list'
| >is not always the first executable line of code.
|
| I have experienced similar problems, and was wondering what the world thinks of
| it.
|
| While stepping through a program, dbx says that it is at line number
| "XYZ" whereas control is actually a few lines ahead of "XYZ". It
| seems to be occuring because I have some character strings in my source
| code with escaped newlines in them. However, I may be wrong.
Some problems may be tracable to the compiler that produced the debug
information in the first place. I discovered that GNU CC was
consistantly using the last line for a multiline statement instead of
the first. The ultimate cause was GNU was using the contents the
current line number and filename when it was processing the
reductions. So I rolled up my sleeves, went in and modified the
grammer to save the line number and filename at the beginning of a
statement, and using the cached information when putting out the debug
information. Perhaps the Sun compiler is doing the same thing?
Another place to look is the preprocessor. See if the preprocessor is
spitting out the correct line numbers for the compiler.
--
Michael Meissner, Data General.
Uucp: ...!mcnc!rti!xyzzy!meissner If compiles were much
Internet: meissner at dg-rtp.DG.COM faster, when would we
Old Internet: meissner%dg-rtp.DG.COM at relay.cs.net have time for netnews?
More information about the Comp.unix.questions
mailing list