Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!tank!eecae!cps3xx!rang From: rang@cpsin3.cps.msu.edu (Anton Rang) Newsgroups: comp.cog-eng Subject: Re: Debug techniques. What's your favorite? Message-ID: <2712@cps3xx.UUCP> Date: 25 Apr 89 01:43:17 GMT References: <1499@wasatch.UUCP> <877@syma.sussex.ac.uk> <22878@agate.BERKELEY.EDU> <5338@xyzzy.UUCP> Sender: usenet@cps3xx.UUCP Reply-To: rang@cpswh.cps.msu.edu (Anton Rang) Organization: Michigan State University, Computer Science Dept. Lines: 44 In-reply-to: throopw@agarn.dg.com's message of 24 Apr 89 19:43:55 GMT In article <5338@xyzzy.UUCP> throopw@agarn.dg.com (Wayne A. Throop) writes: > (In the header: From: csm@violet.berkeley.edu) > (In body of article: Brad Sherman (bks@ALFA.Berkeley.Edu)) > There are certain classes of bugs for which fancy debuggers > are terrific. [... such as segmentation violation ...] > However, more other sorts of bugs, like omitting an '=' to yield > if ( x = y ) /* Assignment */ > [... where a test was intended ...] are not found quite so quickly. Part of the problem here is the overloading of "assignment statement" with "expression" in C, in my opinion. The language should catch this. But on to the debugging discussion.... A better model is that bugs manifest themselves in ways increasingly separated from their ultimate cause, and the more powerful a debugger, the more separation from cause to manifestation can be "backtracked" without resorting to the inclusion of special-purpose traceing or self-checking code. Nice model. I'd add that debuggers which can execute "larger" commands also seem more powerful to me. For instance, being able to evaluate a complex expression involving records, pointers, etc. is invaluable for saving time over a debugger which can only print variable values. > I have no data, but I would suspect that given a corpus of > differing bugs, debugging time is directly proportional > to the skill of the programmer with only slight gains to be had > from sophistication of tools. My personal experience is directly contrary to this assertion, so I suspect it is incorrect. [...] I'd say it's closer to half and half; if I'm working with MacsBug, bugs take me quite a lot longer to find than with, say, VAX DEBUG. But in both cases I'm faster than some others would be (or than I would have been 5 years ago). +---------------------------+------------------------+---------------------+ | Anton Rang (grad student) | "VMS Forever!" | rec.music.newage is | | Michigan State University | rang@cpswh.cps.msu.edu | under discussion... | +---------------------------+------------------------+---------------------+