comp.lang.ada
 help / color / mirror / Atom feed
* Debugging in Ada 95
       [not found] <EACHUS.96Mar14171357@spectre.mitre.org>
@ 1996-03-18  0:00 ` Laurent Guerby
       [not found] ` <DoB9ru.F3y.0.-s@inmet.camb.inmet.com>
  1 sibling, 0 replies; 2+ messages in thread
From: Laurent Guerby @ 1996-03-18  0:00 UTC (permalink / raw)


[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)




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Garbage collection and controlled types (was Re: Java knocks the heck outa ...)
       [not found]   ` <EACHUS.96Mar18144400@spectre.mitre.org>
@ 1996-03-20  0:00     ` Norman H. Cohen
  0 siblings, 0 replies; 2+ messages in thread
From: Norman H. Cohen @ 1996-03-20  0:00 UTC (permalink / raw)


In article <EACHUS.96Mar18144400@spectre.mitre.org>,
eachus@spectre.mitre.org (Robert I. Eachus) writes: 

|>    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.

It is especially true if your program has just mistakenly launched an
ICBM!

But seriously, folks: This approach is in principle possible with certain
well-contained applications such as compilers.  It cannot apply to
programs that alter the state of the world outside the program
(especially in ways that are not easily reversible, e.g. by launching a
missile or deleting a file); or that query aspects of that state that are
changing independently of the program (e.g. the time of day or the
contents of a shared data base).  And in a multitask program it would be
necessary to replay not only the actions of a particular task, but all
the task scheduling events that determined how tasks were interleaved.

--
Norman H. Cohen    ncohen@watson.ibm.com




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1996-03-20  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <EACHUS.96Mar14171357@spectre.mitre.org>
1996-03-18  0:00 ` Debugging in Ada 95 Laurent Guerby
     [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

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