Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!iscuva!jimc
From: jimc@iscuva.ISCS.COM (Jim Cathey)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Problem with LSC 4.0 debugger.
Message-ID: <2633@iscuva.ISCS.COM>
Date: 3 Oct 89 03:02:43 GMT
References: <244@dbase.UUCP> <3424@cbnewsc.ATT.COM>
Distribution: na
Organization: ISC Systems Corporation, Spokane WA
Lines: 33

In article <3424@cbnewsc.ATT.COM> fjo@cbnewsc.ATT.COM (frank.j.owen) writes:
>Many debuggers allow you to do this. It is a VERY nice feature.

However, at least sdb (in Unix-land) _requires_ you to throw a compiler switch
that in effect turns off all optimizations in order for the code generated to
be regular enough for the debugger to pick apart.  You then have to recompile
anything you want to be able to look at or set breakpoints in, or trace stack
frames through.  Not very elegant, and the code you're debugging ends up very
different than the code that had the problem (unless you always use the grunge
switch).  Unfortunately, because things moved around when you threw the switch
a common class of bugs (mashed pointers) is usually very hard to find as 
something different (and usually less visible) is being bashed.

I certainly wouldn't want the job of finding variables in stack frames far
up the stack, especially when they were put into registers who are now in a
different place on the stack.  It could probably be done, especially if a
comprehensive map file were created by the compiler, but how long are you
willing to wait for it?  Do you want it to hold up the release?

A related problem is the size of the output file when the grunge switch is
on.  We have a 350K object file whose file size is over 1MB just because of
all the symbol and stack frame offset crap in it.  

Of course, like Mom and apple pie I would sure _like_ the smarter debugger.

+----------------+
! II      CCCCCC !  Jim Cathey
! II  SSSSCC     !  ISC-Bunker Ramo
! II      CC     !  TAF-C8;  Spokane, WA  99220
! IISSSS  CC     !  UUCP: uunet!iscuva!jimc (jimc@iscuva.iscs.com)
! II      CCCCCC !  (509) 927-5757
+----------------+
			"With excitement like this, who is needing enemas?"