comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Practicalities of Ada for app development
Date: Thu, 21 Jun 2012 16:00:44 -0500
Date: 2012-06-21T16:00:44-05:00	[thread overview]
Message-ID: <js021v$dul$1@munin.nbi.dk> (raw)
In-Reply-To: afa4c8e4-dba8-460c-877b-a848255c4572@googlegroups.com

"Adam Beneschan" <adam@irvine.com> wrote in message 
news:afa4c8e4-dba8-460c-877b-a848255c4572@googlegroups.com...
On Thursday, June 21, 2012 10:14:45 AM UTC-7, Randy Brukardt wrote:

>>
>> I'm sure the situation is not the same for everyone, but I'm surprised 
>> that
>> you (Adam) can get much use out of a debugger, since compilers and their
>> tools is definitely one case where a debugger is pretty much worthless 
>> (the
>> only exception being the rare code generation bug).
>
>Well, since I do get a lot of use out of debuggers, the assertion in the 
>second half of
>your sentence is demonstrably false.  I don't understand it, either.  Why 
>would a
>compiler, or a compiler's tools, be of such a substantially different 
>nature than other
>programs, that would make a debugger useful in one situation and useless in 
>another?

Perhaps I'm too tied to the design of our compiler, but it is not practical 
to debug any of our compiler passes other than the first. These are all 
separate programs that take a combination of in-memory input and temporary 
files to run. The first pass could be debugged, but there are never any 
errors in that (its just parsing). The few times I've tried to use a 
debugger on the compiler (to track down hard crashes that I couldn't find 
conventionally), I spend hours creating batch files and one-off harnesses in 
order to be able to run it more than once. (And you *always* have to run it 
more than once.)

Every compiler I'm familar with uses a design like that, so it would be 
complicated and painful to debug the later passes where the errors typically 
are.

>So far, there have been at least a couple general assertions on this thread 
>about the
> uselessness of debuggers (not merely observations based on experience, 
> but assertions
> as if it were a matter of fact), but I haven't seen a good explanation why 
> this assertion
> should be true.  I'm beginning to think that either (1) everyone else's 
> situation is substantially
>different from mine, or (2) I use debuggers in ways that others aren't used 
>to using, or (3) I
> use debuggers that have features that aren't present in debuggers that 
> others are used to
> using.

The latter might be the most likely, at least in my case. I've never had any 
luck with any "advanced" features in debuggers; I barely can get the basic 
ones to work. (Our own debugger is an exception, but it doesn't have any 
"advanced" features, so it doesn't change anything.) I've never gotten 
anything to work in any of the modern Microsoft debuggers, for instance; I 
can't even get them to display a memory location. (I use the debugger from 
Windows NT when I have to do that, because at least I can get basic commands 
to work in it.)

> Maybe we could start by having those who don't think debuggers are useful 
> for Ada answer
> this: what do you think a debugger would be used for, when it *is* useful? 
> If your answer to
> this is a lot smaller then the set of things I think it can be used for, 
> that may help explain why
> there's such a difference of opinion.

The only thing I've ever found a debugger useful for is single-stepping 
and/or executing to breakpoints. You have to do that multiple times before 
you hit on the magic incantation that gets you to that part of the program 
that you need to look at. And you can waste so much time attempting to do 
that that most of the time it is much easier to read the trace log from 
directly above the problem (since it is already built-in to the 
application). Plus adding a few traces, recompiling, rerunning, and looking 
at the results will find the bug before I could have even figured out 
exactly where the breakpoint needs to be.

The only time the debugger hassle is worth it is when the bug is 
sufficiently low-level that you can't debug it at the Ada level (as when a 
register has the wrong value for some reason, causing a hardware fault). And 
that usually takes me many hours (usually an entire working day) for a 
single problem, as opposed to dealing with a problem an hour or so at the 
Ada level.

                                Randy. 





  parent reply	other threads:[~2012-06-21 21:00 UTC|newest]

Thread overview: 112+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-08 20:48 Practicalities of Ada for app development wrp
2012-06-08 21:35 ` Jeffrey Carter
2012-06-09  0:40   ` Adam Beneschan
2012-06-09  6:38     ` Jeffrey Carter
2012-06-21 17:14       ` Randy Brukardt
2012-06-21 18:16         ` Adam Beneschan
2012-06-21 19:18           ` J-P. Rosen
2012-06-21 20:30             ` Adam Beneschan
2012-06-21 21:09               ` Randy Brukardt
2012-06-22  4:59                 ` Simon Wright
2012-06-22  5:32                   ` Tero Koskinen
2012-06-22 19:51                     ` Randy Brukardt
2012-06-21 21:15               ` J-P. Rosen
2012-06-22 10:43               ` Tero Koskinen
2012-06-21 21:00           ` Randy Brukardt [this message]
2012-06-21 21:18             ` J-P. Rosen
2012-06-22 19:55               ` Randy Brukardt
2012-06-23  6:43                 ` J-P. Rosen
2012-06-09  4:30   ` BrianG
2012-06-09  7:11   ` Georg Bauhaus
2012-06-13 10:20   ` quiet_lad
2012-06-09  6:55 ` gautier_niouzes
2012-06-09  7:04 ` Georg Bauhaus
2012-06-09  9:25 ` Nomen Nescio
2012-06-09  9:36   ` Dmitry A. Kazakov
2012-06-10  3:46     ` Yannick Duchêne (Hibou57)
2012-06-12 20:10     ` i3text
2012-06-13  7:55       ` Dmitry A. Kazakov
2012-06-21 17:21         ` Randy Brukardt
2012-06-13 10:28     ` quiet_lad
2012-06-13 13:07       ` Dmitry A. Kazakov
2012-06-09 16:09   ` tmoran
2012-06-13 10:29     ` quiet_lad
2012-06-09 23:18   ` darkestkhan
2012-06-10  3:56     ` Yannick Duchêne (Hibou57)
2012-06-10 14:04     ` Dmitry A. Kazakov
2012-06-10 16:51       ` Yannick Duchêne (Hibou57)
2012-06-10 17:00         ` Dmitry A. Kazakov
2012-06-10 17:18           ` Yannick Duchêne (Hibou57)
2012-06-10 19:33             ` Dmitry A. Kazakov
2012-06-10 21:36               ` Nomen Nescio
2012-06-11  8:22                 ` Dmitry A. Kazakov
2012-06-11 14:27                   ` Georg Bauhaus
2012-06-11 14:43                     ` Dmitry A. Kazakov
2012-06-11 16:19                       ` Jacob Sparre Andersen
2012-06-11 18:38                         ` Dmitry A. Kazakov
2012-06-11 17:14                       ` Georg Bauhaus
2012-06-11 18:38                         ` Dmitry A. Kazakov
2012-06-11 20:50                           ` Georg Bauhaus
2012-06-11 21:43                             ` Yannick Duchêne (Hibou57)
2012-06-12  7:55                             ` Dmitry A. Kazakov
2012-06-12  9:48                               ` Georg Bauhaus
2012-06-12 11:44                                 ` Dmitry A. Kazakov
2012-06-12 12:17                                   ` Georg Bauhaus
2012-06-12 12:18                                     ` Dmitry A. Kazakov
2012-06-11 18:29                 ` Adam Beneschan
2012-06-11 19:16                   ` Jeffrey Carter
2012-06-11 21:47                   ` Yannick Duchêne (Hibou57)
2012-06-21 17:39                     ` Randy Brukardt
2012-06-21 17:34                   ` Randy Brukardt
2012-06-10 18:15       ` darkestkhan
2012-06-10 19:25         ` Dmitry A. Kazakov
2012-06-11  6:34         ` Jacob Sparre Andersen
2012-06-21 17:41         ` Randy Brukardt
2012-06-10 15:49   ` Shark8
2012-06-10 17:04     ` Yannick Duchêne (Hibou57)
2012-06-10 19:47       ` Dmitry A. Kazakov
2012-06-11  0:37         ` Nasser M. Abbasi
2012-06-11  8:37           ` Dmitry A. Kazakov
2012-06-12  6:24             ` Yannick Duchêne (Hibou57)
2012-06-12  7:59               ` Dmitry A. Kazakov
2012-06-13 10:35         ` quiet_lad
2012-06-13 13:09           ` Dmitry A. Kazakov
2012-06-14  3:21             ` quiet_lad
2012-06-14  7:58               ` Dmitry A. Kazakov
2012-06-14  8:39                 ` Yannick Duchêne (Hibou57)
2012-06-14  9:26                   ` Dmitry A. Kazakov
2012-06-21 17:51                   ` Randy Brukardt
2012-06-11  0:00     ` Nasser M. Abbasi
2012-06-11  3:23       ` Jeffrey Carter
2012-06-11 21:10         ` Nomen Nescio
2012-06-11 21:55           ` Adam Beneschan
2012-06-12  8:07             ` Nomen Nescio
2012-06-12 15:28               ` Fritz Wuehler
2012-06-12 21:34                 ` Nomen Nescio
2012-06-14 11:12                   ` Nomen Nescio
2012-06-21 18:01                   ` Randy Brukardt
2012-06-12 21:12             ` Nomen Nescio
2012-06-13  0:04               ` Adam Beneschan
2012-06-13  3:04                 ` Shark8
2012-06-13  8:21                   ` Dmitry A. Kazakov
2012-06-13 18:21                     ` Shark8
2012-06-13 19:11                       ` Dmitry A. Kazakov
2012-06-13 22:01                         ` Yannick Duchêne (Hibou57)
2012-06-14  8:02                           ` Dmitry A. Kazakov
2012-06-14  9:10                             ` Yannick Duchêne (Hibou57)
2012-06-14  9:33                               ` Dmitry A. Kazakov
2012-06-21 18:10                                 ` Randy Brukardt
2012-06-13  8:35                 ` Yannick Duchêne (Hibou57)
2012-06-13  8:37                 ` Georg Bauhaus
2012-06-13 10:14                   ` Georg Bauhaus
2012-06-11 22:49           ` Jeffrey Carter
2012-06-13 10:31     ` quiet_lad
2012-06-13 12:57       ` Maciej Sobczak
2012-06-14  4:18         ` quiet_lad
2012-06-14  7:35           ` Ludovic Brenta
2012-06-14 10:02             ` Georg Bauhaus
2012-06-12 19:17 ` i3text
2012-06-12 19:52 ` Vadim Godunko
2012-06-27 18:39 ` Eryndlia Mavourneen
2012-06-27 18:46 ` Eryndlia Mavourneen
2012-06-28 13:23   ` Simon Wright
replies disabled

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