comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Record operations (Algebraic Data Types and printing)
Date: Thu, 11 Oct 2018 16:32:35 -0500
Date: 2018-10-11T16:32:35-05:00	[thread overview]
Message-ID: <ppofnk$i5a$1@franka.jacob-sparre.dk> (raw)
In-Reply-To: pplfgr$63i$1@dont-email.me

"G. B." <nonlegitur@nmhp.invalid> wrote in message 
news:pplfgr$63i$1@dont-email.me...
...
> But are all Ada debuggers and simulators in such a state? I find staring 
> at
> trace logs unproductive in comparison.  Maybe, though, some programmers
> like the challenge.

Debuggers have their place, but a lot of problems either don't lend 
themselves to using a debugger (because they're not reproducible) or don't 
need it (because the failure itself gave enough information to fix it). In 
both of these cases, trace information can be very valuable. And (IMHO) in a 
well-designed program, you aren't recompling to add it because it is already 
there (almost all of my programs have a way - GUI box, command line option, 
etc. - to get additional tracing/logging from the norm).

The "don't need it" case might need a bit of explanation: failure of 
language-defined checks in Janus/Ada have always contained information about 
the failures and a call walkback with line numbers and subprogram names. (No 
wacky tools needed to get that!) That's also triggerable from program code, 
so we use the same mechanism for internal errors. (Also to note: for servers 
like our web server and spam filter, we can log that information into the 
usual server log.)

With information like that, it's possible at least 75% of the time to figure 
out what the actual problem was and how to fix it. Turning on the existing 
tracing for the affected subsystems will figure out many of the remaining 
cases. So I tend to use debuggers only when reproducible (it's always going 
to take more than one attempt to figure out what is going wrong, 'cause 
backwards execution isn't a realistic option) and mysterious.

The top case of that is when a hardware fault occurs rather than a 
language-defined check failure. Those are generally considered bugs in the 
Janus/Ada compilation system (although users can write erroneous code that 
will cause them, thru interfacing, unchecked_conversion, or streaming), and 
thus one can't really trust what was *supposed* to happen - the generated 
code is likely wrong and needs fixing.

Image for all types should make it easier to construct those logs and give 
better information in exception messages for user-defined exceptions. So 
that seems like a net win, regardless of whether a debugger could have given 
somewhat similar information.


                                                                Randy.


  parent reply	other threads:[~2018-10-11 21:32 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-05 17:46 Record operations (Algebraic Data Types and printing) Henrik Härkönen
2018-10-05 17:58 ` AdaMagica
2018-10-05 18:11   ` Henrik Härkönen
2018-10-05 18:46     ` Niklas Holsti
2018-10-05 20:33       ` Henrik Härkönen
2018-10-06  5:38   ` J-P. Rosen
2018-10-06  7:08     ` Henrik Härkönen
2018-10-06 16:42       ` Lucretia
2018-10-08 23:08         ` Randy Brukardt
2018-10-09  1:12           ` Lucretia
2018-10-09 22:20             ` Randy Brukardt
2018-10-10  7:17               ` Dmitry A. Kazakov
2018-10-10 18:13                 ` G. B.
2018-10-10 18:36                   ` Dmitry A. Kazakov
2018-10-11 11:29                   ` Björn Lundin
2018-10-11 14:45                     ` Jacob Sparre Andersen
2018-10-11 18:34                       ` Björn Lundin
2018-10-12 19:08                     ` G. B.
2018-10-12 19:20                       ` Randy Brukardt
2018-10-11 21:32                   ` Randy Brukardt [this message]
2018-10-10 18:38                 ` Shark8
2018-10-11  8:36                   ` Dmitry A. Kazakov
2018-10-11 21:35                 ` Randy Brukardt
2018-10-12  7:14                   ` Dmitry A. Kazakov
2018-10-12 19:16                     ` Randy Brukardt
2018-10-06 16:18     ` Jeffrey R. Carter
2018-10-06 17:19       ` Dmitry A. Kazakov
2018-10-08 23:03   ` Randy Brukardt
2018-10-09  6:22     ` Henrik Härkönen
2018-10-09  7:32       ` Paul Rubin
2018-10-09  7:38         ` Henrik Härkönen
2018-10-09 22:25         ` Randy Brukardt
2018-10-05 18:32 ` Niklas Holsti
2018-10-05 18:43   ` Henrik Härkönen
2018-10-05 19:41   ` Simon Wright
2018-10-06  6:17     ` Henrik Härkönen
2018-10-06 16:04       ` Stephen Leake
2018-10-06 16:56         ` Simon Wright
2018-10-08  6:44           ` briot.emmanuel
2018-10-08 14:09             ` Simon Wright
2018-10-08 14:21               ` Bill Findlay
2018-10-08 14:42                 ` Simon Wright
2018-10-08 16:46                   ` Bill Findlay
replies disabled

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