From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: Debugging Problem with Gnatbench under Eclipse Date: Wed, 13 Nov 2013 10:37:36 -0700 Organization: Also freenews.netfront.net; news.tornevall.net Message-ID: References: <5384e37a-764a-4368-8834-0de4c7d7998c@googlegroups.com> <46F25mG2OQgSFw2s@ada-augusta.demon.co.uk> <3d734e02-f7eb-4a32-86ca-0d56e059e276@googlegroups.com> <45AGpDFh3jgSFwmZ@ada-augusta.demon.co.uk> <6ea825d7-a48d-4fca-9fbc-1d17e1841343@googlegroups.com> <528335bf$0$9510$9b4e6d93@newsspool1.arcor-online.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 13 Nov 2013 17:37:39 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="b91ebeedbc496c8222e2854f15ee7105"; logging-data="10662"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/lXh++oLunBBqsyTfnZu7oBTDO7kwVDSQ=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 In-Reply-To: <528335bf$0$9510$9b4e6d93@newsspool1.arcor-online.net> Cancel-Lock: sha1:b/1U2FsIjMIr5U+HCGs/t141yEM= Xref: news.eternal-september.org comp.lang.ada:17659 Date: 2013-11-13T10:37:36-07:00 List-Id: 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