Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!isis!nlarson From: nlarson@isis.cs.du.edu (Neil Larson) Newsgroups: comp.lang.pascal Subject: Re: Turbo 6.0: problem with inthtegrated debugger. Message-ID: <1991Jan9.183514.7754@isis.cs.du.edu> Date: 9 Jan 91 18:35:14 GMT References: <2394@bnlux0.bnl.gov> Reply-To: nlarson@isis.UUCP (Neil Larson) Organization: Math/CS, University of Denver Lines: 24 In article <2394@bnlux0.bnl.gov> kushmer@bnlux0.bnl.gov (christopher kushmerick) writes: >I am having what appears to be recurring and intermittant problems >with the integrated debugger. I am trying to use the F-4 (run to cursor) >command, and it reports that there is no code generated for this line. > >Sometimes it works correctly, sometimes not, for the same line. > Sometimes optimizations made by the compiler consist of using a similar line of code near the one in question instead. Jeesh, this is hard to explain. say you have code that looks like this: calculatecrc16(packet,crcval); if crcval = 0 then crcvalerror := true; calculatecrc16(packet,crcval); the compiler will not create identical machine code for both calls to the procedure calls, but will just jump to the previous call. Stepping through the code will show the current line executing and whats happening is obvious. You can force the situation by inserting a writeln("put this line in"); at the point you want to stop. I learned this by tracking execution of turboc programs with the debugger.