Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!gatech!mcnc!rti!xyzzy!tiktok!meissner From: meissner@tiktok.dg.com (Michael Meissner) Newsgroups: comp.unix.questions Subject: Re: dbx screwing up... Keywords: dbx Message-ID: <6024@xyzzy.UUCP> Date: 16 May 89 22:07:25 GMT References: <1666@eric.mpr.ca> <14490@duke.cs.duke.edu> Sender: usenet@xyzzy.UUCP Reply-To: meissner@tiktok.UUCP (Michael Meissner) Organization: Data General (Languages @ Research Triangle Park, NC.) Lines: 33 In article <14490@duke.cs.duke.edu> apte@helios.UUCP (Jitendra Apte) writes: | In article <1666@eric.mpr.ca> parker@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@dg-rtp.DG.COM faster, when would we Old Internet: meissner%dg-rtp.DG.COM@relay.cs.net have time for netnews?