comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Carter <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: Debugging Problem with Gnatbench under Eclipse
Date: Wed, 13 Nov 2013 10:37:36 -0700
Date: 2013-11-13T10:37:36-07:00	[thread overview]
Message-ID: <l60dd1$ad6$1@dont-email.me> (raw)
In-Reply-To: <528335bf$0$9510$9b4e6d93@newsspool1.arcor-online.net>

On 11/13/2013 01:18 AM, Georg Bauhaus wrote:
>
> Could it be that Ada programmers just don't know debuggers? 8-)
>
> Debuggers turn my unforgiving CPU into a much more lenient interpreter,
> Its steps are under my control.
>
> Debuggers provide for a kind of "virtual machine", or extended machine.
> They add features with uses for the programmer without him or her adding
> a single line of source text. I can manipulate the program as is, I can
> see call chains easily, at every instruction I choose, in circumstances
> I choose.

I have used debuggers, and am familiar with what they do. Still it has been over 
a decade since I used one.

Most errors have nice exceptions that point me directly to the problem. Most 
others I can find quickly by drawing on my knowledge of the system and my 
experience. This leaves few errors that call for more extensive facilities. As 
Beneschan has pointed out, some of these are such that it's best to add some 
additional logging to find out what's happening. This leaves very few errors 
where a debugger would be a good choice.

Very often, my work has involved embedded targets with no debugging capabilities.

But sometimes I work on system with debuggers available, yet I still rarely use 
a debugger. While a debugger has powerful capabilities, these come with a 
learning curve. Often I am using a different tool chain since the last time I 
used a debugger; even when that is not the case, I have usually forgotten how to 
use it.

It is almost always more efficient use of my time to use additional logging 
rather than learning how to use the debugger. As a result, I rarely use them.

Finally, it's important to remember that my response was to someone coming from 
C/++. The vast majority of what such people are accustomed to using a debugger 
to find is impossible in Ada. The compiler catches most of them, and the 
remainder cause those nice exceptions I mentioned above rather than creating 
memory corruption. I'm sure that the OP, once he's had some experience with Ada, 
will agree that, compared to C/++, one rarely needs a debugger with Ada.

-- 
Jeff Carter
"Alms for an ex-leper!"
Monty Python's Life of Brian
75

  parent reply	other threads:[~2013-11-13 17:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-11  2:27 Debugging Problem with Gnatbench under Eclipse Fritz von Braun
2013-11-11  5:40 ` Jeffrey Carter
2013-11-11 16:20   ` Mike H
2013-11-12  0:46     ` Fritz von Braun
2013-11-12 14:40       ` Mike H
2013-11-12 17:43         ` Bill Findlay
2013-11-13  1:12         ` Adam Beneschan
2013-11-13  8:18           ` Georg Bauhaus
2013-11-13  9:11             ` Dmitry A. Kazakov
2013-11-13 10:17               ` Simon Wright
2013-11-13 17:37             ` Jeffrey Carter [this message]
2013-11-13  9:14           ` Mike H
2014-02-10 17:40 ` john
replies disabled

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