comp.lang.ada
 help / color / mirror / Atom feed
From: Laurent.Guerby@enst-bretagne.fr (Laurent Guerby)
Subject: Debugging in Ada 95
Date: 1996/03/18
Date: 1996-03-18T00:00:00+00:00	[thread overview]
Message-ID: <4xspf6871b.fsf_-_@leibniz.enst-bretagne.fr> (raw)
In-Reply-To: EACHUS.96Mar14171357@spectre.mitre.org

[thread renamed]

Robert I. Eachus writes
:    Unfortunately, when I really need a debugger, what I find myself
: looking for is the previous values of things.  With a trace file, print
: previous value is an implementable, although potentially expensive,
: feature. ;-)
: 
:    Yes, it is more work, but you probably have no idea how USEFUL it
: is to be able to back up the state of the computation.  This is
: especially true if what you are trying to debug is a rare exception or
: the like.  Some day, someone is going to build a debugger that can do
: that.  In the meantime I struggle along with trace files and logic
: analyzers.
: 
:    I'm not knocking the idea of making the 'IMAGE attribute more
: widely available.  After all the widening that took place in Ada 95 is
: very nice, it wouldn't have been that hard to go the whole way.

   The "easy"  workaround  is to declare when  possible  a Set_X  each
state variable. For example, while developping a simple ray tracer, we
got an Constraint_Error on a few points, and so we used a :

   (gdb) call Set_Ray (R, (X, Y))
   (gdb) ... step inside the Ray_Color function

with the guessed values of X, Y (the black  spot on our image ;-). GDB
is good at dumping the record values in a  nice format (not for tagged
objects in all cases though), so you don't have to define anything for
"image" except for recursive data structures (no tool will do that for
you in all cases - circular structures).

: 					Robert I. Eachus

-- 
--  Laurent Guerby, student at Telecom Bretagne (France), Team Ada
--  "Use the Source, Luke. The Source will be with you, always (GPL)"
--  http://www-eleves.enst-bretagne.fr/~guerby/ (GATO Project)
--  Try GNAT, the GNU Ada 95 compiler (ftp://cs.nyu.edu/pub/gnat)




       reply	other threads:[~1996-03-18  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <EACHUS.96Mar14171357@spectre.mitre.org>
1996-03-18  0:00 ` Laurent Guerby [this message]
     [not found] ` <DoB9ru.F3y.0.-s@inmet.camb.inmet.com>
     [not found]   ` <EACHUS.96Mar18144400@spectre.mitre.org>
1996-03-20  0:00     ` Garbage collection and controlled types (was Re: Java knocks the heck outa ...) Norman H. Cohen
replies disabled

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