comp.lang.ada
 help / color / mirror / Atom feed
From: "James Giles" <jamesgiles@worldnet.att.net>
Subject: Re: F9X twister & ADA (was: n-dim'l vectors)
Date: 2000/04/12
Date: 2000-04-12T00:00:00+00:00	[thread overview]
Message-ID: <r62J4.930$PV.52530@bgtnsc06-news.ops.worldnet.att.net> (raw)
In-Reply-To: 38F41313.DAF90E74@research.canon.com.au

Geoff Bull wrote in message <38F41313.DAF90E74@research.canon.com.au>...
...
>>   And,
>> branching to a handler probably loses all of the register contents
>> that were present when the error arose.
>I'm missing something.
>By my definition of quit immediately you lose the contents of registers too.

Those are (should be) in the drop-file, core file, or whatever is
generated on your system that the debugger gets to look at when
a program abnormally terminates.  If the program continues to run
*after* the error is detected, this information reflects the state
the program is in when it *does* finally terminate (ie. after
"graceful" termination).

>> The buffers are inside the system and not part of my process
>> image anyway.  Systems which
>> throw away I/O buffer information when a process terminates
>> are seriously broken.
>
>What about buffered io and user defined buffering?

Like all parts of the program's state, those are all still present
*in* the debugging file.  You can inspect them there.

>>  Like the possibility
>> of sending yourself a KILL signal.
>
>Well, I'll admit to once doing this in a C program.
>But it seems amazingly ugly compared to simply raising an exception,
>to get precisely the same outcome.

I think undocumented exceptions are clearly the ugliest way to
accomplish this. Any public property of a procedure which isn't
explicitly declared - by direct requirement of the language
definition - is probably a bad idea.

> And sending signals is not portable (especially to bare hw with no OS).

And, sending signals would be perfectly portable if the language
standard required them.  How bare is the hardware?  If it's all
*that* bare, it won't support I/O or exceptions either.

>Of course you have no more way of knowing which library routines might
>send signals than you do of knowing which might raise exceptions.

Why not?  The fact that a routine sends a signal can be explicitly
declared (by requirement of the language, even).  But, since the
semantics of signals isn't attached to the procedure-call chain,
there's no need to declare this fact for each procedure that calls
the one that sends the signal.  Signals are, explicitly, messages to
the process as a whole.  They are not messages to the nearest
active caller that has a handler defined.

--
J. Giles






  parent reply	other threads:[~2000-04-12  0:00 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <8cctts$ujr$1@nnrp1.deja.com>
     [not found] ` <38EA0440.1ECBC158@ncep.noaa.gov>
2000-04-06  0:00   ` F9X twister & ADA (was: n-dim'l vectors) bv
2000-04-06  0:00     ` Richard Maine
2000-04-07  0:00       ` Brian Rogoff
2000-04-08  0:00         ` Dick Hendrickson
2000-04-08  0:00           ` Richard Maine
2000-04-09  0:00             ` Gary Scott
2000-04-09  0:00               ` Richard Maine
2000-04-09  0:00           ` Geoff Bull
2000-04-09  0:00             ` Dick Hendrickson
2000-04-09  0:00               ` Robert Dewar
2000-04-09  0:00                 ` Gordon Sande
2000-04-09  0:00                   ` James Giles
2000-04-10  0:00                 ` tmoran
2000-04-15  0:00                 ` Aidan Skinner
2000-04-17  0:00                   ` Robert I. Eachus
2000-04-16  0:00                 ` Ken Garlington
2000-04-12  0:00               ` Robert I. Eachus
2000-04-10  0:00       ` bv
2000-04-10  0:00         ` James Van Buskirk
2000-04-11  0:00         ` James Giles
2000-04-11  0:00           ` Dale Stanbrough
2000-04-11  0:00             ` James Giles
2000-04-12  0:00               ` Robert A Duff
2000-04-11  0:00           ` Geoff Bull
2000-04-11  0:00             ` James Giles
2000-04-11  0:00               ` Larry Kilgallen
2000-04-11  0:00                 ` James Giles
2000-04-11  0:00                   ` Larry Kilgallen
2000-04-12  0:00                   ` Robert A Duff
2000-04-12  0:00               ` Geoff Bull
2000-04-12  0:00                 ` James Giles
2000-04-12  0:00                   ` Geoff Bull
2000-04-12  0:00                     ` James Giles
2000-04-12  0:00                       ` Geoff Bull
2000-04-12  0:00                         ` Marin D. Condic
2000-04-12  0:00                           ` James Giles
2000-04-12  0:00                           ` James Giles
2000-04-12  0:00                         ` James Giles [this message]
2000-04-13  0:00                           ` Geoff Bull
2000-04-13  0:00                             ` James Giles
2000-04-14  0:00                               ` Geoff Bull
2000-04-13  0:00                             ` Debugging (was: F9X twister & ADA) James Giles
2000-04-14  0:00           ` F9X twister & ADA (was: n-dim'l vectors) bv
2000-04-07  0:00     ` Erik Edelmann
2000-04-07  0:00       ` Robert Dewar
2000-04-07  0:00         ` Erik Edelmann
2000-04-07  0:00     ` Paul van Delst
2000-04-10  0:00       ` bv
replies disabled

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