home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.object
- Path: sparky!uunet!haven.umd.edu!decuac!pa.dec.com!decwrl!cache.crc.ricoh.com!cache!steve
- From: steve@crc.ricoh.COM (Stephen R. Savitzky)
- Subject: Re: How to debug an OO System
- In-Reply-To: laffra@watson.ibm.com's message of 4 Jan 93 20:06:17 GMT
- Message-ID: <STEVE.93Jan5110030@styx.crc.ricoh.COM>
- Lines: 37
- Sender: news@crc.ricoh.com (USENET News System)
- Nntp-Posting-Host: styx.crc.ricoh.com
- Organization: RICOH California Research Center
- References: <1993Jan04.200617.17300@watson.ibm.com>
- Date: 5 Jan 93 11:00:30
-
- In article <1993Jan04.200617.17300@watson.ibm.com> laffra@watson.ibm.com (C.Laffra) writes:
-
- I am interested in the subject of debugging object-oriented systems.
- I have some questions:
-
- 1) does OO make debugging unnecessary?
-
- Of course not. Bugs are possible in any language.
-
- 2) If not, how do you debug your OO system?
-
- In general, the same way I debug anything else: insert
- instrumentation (usually print statements or the equivalent,
- conditional on a global Debug_Mode flag), and observe the results.
- I should mention that this is C++.
-
- In many cases I use assertions to generate error messages when
- something is wrong, thus performing a filtering function.
-
- When debugging a library one also has to provide test drivers,
- typically with test data coming from a file.
-
- 3) If so, what do you miss in existing debuggers?
-
- The reason I use the technique above, which involves messing with the
- source code, is that existing debuggers usually give too much
- information and know too little about the semantics of the program
- being debugged.
-
- Also, debuggers usually have no way to save instrumentation
- (breakpoints, watchpoints, etc.) between iterations of the
- edit/compile/debug cycle. Instrumenting the source gives me this
- ability.
-
- 4) Are graphical techniques the answer?
-
- No.
- --
- \ --Steve Savitzky-- \ 343 Leigh Ave \ REAL HACKERS USE AN AXE!
- \ steve@crc.ricoh.COM \ San Jose, CA 95128 \ Free Cyberia!
- \ w: 415-496-5710 \ h:408-294-6492 \
- \_________________________________________________________________________
-