comp.lang.ada
 help / color / mirror / Atom feed
From: kilgallen@eisner.decus.org (Larry Kilgallen)
Subject: Re: GDB Woes Continued...
Date: 1998/02/05
Date: 1998-02-05T00:00:00+00:00	[thread overview]
Message-ID: <1998Feb5.055818.1@eisner> (raw)
In-Reply-To: 98020216364905@psavax.pwfl.com


In article <98020216364905@psavax.pwfl.com>, "Marin David Condic, 561.796.8997, M/S 731-96" <condicma@PWFL.COM> writes:
> Robert Dewar <dewar@MERV.CS.NYU.EDU> writes:
>>However, to explain my comment above. I continue to think that most people
>>greatly overuse debuggers. It is much better to write error-free code in
>>the first place, and if you do have errors, to think about what is wrong,
>>and fix it, rather than spending ages in a debugger looking arond.
>>
>     This is very true for most types of "workstation-ish" programs. In
>     most of the things I've built using Gnat on a Sun platform, I've
>     found very little use for a debugger because you can usually bench
>     check the code to be mostly error free from the beginning. (At
>     least for the kinds of errors most commonly found with a debugger.
>     If the program executes, but doesn't perform the task correctly
>     because you've messed up a requirement somewhere, the debugger is
>     going to be of little value.) Bench checking for routine errors
>     also invariably leads to: "Gee! That's not supposed to be here..."
>     sorts of discoveries which tend to minimize the fundamental flaws
>     you don't see when checking for superficial flaws with a debugger.

While bench checking is useful, I find a debugger extremely valuable for
defective behavior which can be reproduced.

If you get a failure:

	every time you run
	always on the 537th invocation of a particular subprogram
	within a given task
	for a second parameter value of 7

a debugger relieves one of the need to join the "printf" school
of debugging (C terminology used intentionally). Just set a
conditional breakpoint and step line by line once you get there.
If need be on your next run you can back up to invocation 536.

Larry Kilgallen




  reply	other threads:[~1998-02-05  0:00 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-02-02  0:00 GDB Woes Continued Marin David Condic, 561.796.8997, M/S 731-96
1998-02-05  0:00 ` Larry Kilgallen [this message]
  -- strict thread matches above, loose matches on Subject: below --
1998-02-03  0:00 Marin David Condic, 561.796.8997, M/S 731-96
1998-02-04  0:00 ` Robert Dewar
1998-02-02  0:00 Robert Dewar
1998-02-04  0:00 ` Anonymous
1998-02-04  0:00   ` Robert Dewar
1998-02-02  0:00 tmoran
1998-02-02  0:00 ` wanker
1998-02-02  0:00 ` Robert Dewar
1998-01-31  0:00 wanker
1998-01-31  0:00 ` Jerry van Dijk
1998-02-02  0:00   ` Roger Racine
1998-02-02  0:00     ` wanker
1998-02-02  0:00       ` Robert Dewar
1998-02-02  0:00         ` Larry Kilgallen
1998-02-04  0:00         ` John English
1998-02-02  0:00       ` Robert Dewar
1998-02-03  0:00         ` Ronald Cole
1998-02-03  0:00           ` Robert Dewar
1998-02-04  0:00             ` Andrew Lynch
1998-02-04  0:00             ` Jerry van Dijk
1998-02-05  0:00               ` Larry Kilgallen
1998-02-09  0:00               ` Martin C. Carlisle
1998-02-04  0:00             ` Roger Racine
1998-02-04  0:00               ` Robert Dewar
1998-02-04  0:00                 ` Roger Racine
1998-02-04  0:00                   ` Robert Dewar
1998-02-02  0:00   ` Martin C. Carlisle
1998-02-03  0:00   ` vonhend
1998-02-02  0:00 ` Stephen Leake
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox