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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,d5b211b0c1ffcf3e X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.68.193.129 with SMTP id ho1mr793704pbc.8.1340310979517; Thu, 21 Jun 2012 13:36:19 -0700 (PDT) Path: l9ni4411pbj.0!nntp.google.com!news1.google.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Practicalities of Ada for app development Date: Thu, 21 Jun 2012 13:30:18 -0700 (PDT) Organization: http://groups.google.com Message-ID: <92daaca1-46ae-43e1-abae-397b4bf6aa33@googlegroups.com> References: <79c5c9f7-4b72-4990-8961-b3e2db4db79b@qz1g2000pbc.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 X-Trace: posting.google.com 1340310979 8094 127.0.0.1 (21 Jun 2012 20:36:19 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 21 Jun 2012 20:36:19 +0000 (UTC) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-06-21T13:30:18-07:00 List-Id: On Thursday, June 21, 2012 12:18:52 PM UTC-7, J-P. Rosen wrote: > Le 21/06/2012 20:16, Adam Beneschan a =E9crit : >=20 > > 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? >=20 > Here is my typical use case. Sometimes, AdaControl encounters an > unexpected combination of constructs, and generally fails with an Asis > message saying "improper element". The exception message tells me where > it happens, but generally the problem is slightly above, in the query > that produced the invalid value. I just add a trace message at this > query (I also have an integrated trace facility in AdaControl), and > rerun the program. >=20 > In general, I get /thousands/ of useless messages (and I can't predict > how many) before the one I'm interested in, that is, the last one before > the crash. I don't care, I just let the screen scroll... How could I do > that in a debugger? A breakpoint, and thousands of useless "go" > commands? No thanks. Actually, that's a typical case where I find a debugger useful. At the poi= nt where you add the trace message, I set a breakpoint, but set it up so th= at it continues automatically and doesn't display any message. Then when t= he crash occurs, I ask the debugger to display information on the breakpoin= t, and find that it occurred N times. Then I rerun the program, and set a = breakpoint at that same place, telling the debugger to stop the program aft= er it's hit that place N-1 times. That way, I can see what's going on just= before the crash. I do that sort of thing quite frequently. Of course, i= t only works if you can duplicate the run exactly, which isn't always going= to be possible with some nondeterministic programs that depend on external= events. -- Adam