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,93a8020cc980d113 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Newsgroups: comp.lang.ada Subject: Re: What is wrong with Ada? References: <1176150704.130880.248080@l77g2000hsb.googlegroups.com> <461B52A6.20102@obry.net> <461BA892.3090002@obry.net> <82dgve.spf.ln@hunter.axlog.fr> <1176226291.589741.257600@q75g2000hsh.googlegroups.com> From: Markus E Leypold Organization: N/A Date: Tue, 10 Apr 2007 20:24:17 +0200 Message-ID: <2tabxgm6jy.fsf@hod.lan.m-e-leypold.de> User-Agent: Some cool user agent (SCUG) Cancel-Lock: sha1:PyY9xWy0mKlqQgHccn7bwktlcPA= MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit NNTP-Posting-Host: 88.72.227.169 X-Trace: news.arcor-ip.de 1176229019 88.72.227.169 (10 Apr 2007 20:16:59 +0200) X-Complaints-To: abuse@arcor-ip.de Path: g2news1.google.com!news3.google.com!feeder3.cambrium.nl!feed.tweaknews.nl!newsfeed.kamp.net!newsfeed.kamp.net!news.unit0.net!newsfeed.arcor-ip.de!news.arcor-ip.de!not-for-mail Xref: g2news1.google.com comp.lang.ada:14881 Date: 2007-04-10T20:24:17+02:00 List-Id: "Chad R. Meiners" writes: > On Apr 10, 12:12 pm, Jean-Pierre Rosen wrote: >> Markus E Leypold a �crit :> Pascal Obry writes: >> >> >> Markus, >> >> >>>> Why do they like unreadable code? >> >>>> Why do they like to play with a debugger ? >> >>> Good question. That "real Ada software engineers" (like "real men") >> >>> never need a debugger might be the reason why gdb is so badly >> >>> integrated with Gnat. That's a thought. >> >> gdb is used with Ada just not so often. >> >> > Right. But when it is used, it is sorely needed, since this then is >> > one of the conceptual bugs I mentioned. >> >> Sorry, but I beg to disagree here. Conceptual bugs are found by >> reasonning on the source, not with a debugger. Every now and then you >> may need to check the value of a variable at some point in execution to >> validate or invalidate an hypothesis, but even there, I find a proper >> trace message much faster and more precise than using a debugger. >> -- >> --------------------------------------------------------- >> J-P. Rosen (r...@adalog.fr) >> Visit Adalog's web site athttp://www.adalog.fr > > > I disagree. Sometimes trace messages add line noise and maintaince > requirements to the code base, And in sad reality, exactly the tracing you need to find that special bug, ist not in place at the given moment. Also the idea to instrument for tracing every piece of source strikes me a s remarkably similar to the philosophy of inserting checks for overflows and invalid pointers over the whole source base: I thought that we had done away with stuff of that kind -- "for every piece if source you should also ..." -- exactly by delegating that to tools: Either the compiler or a debugger. Which reminds me, that I wished that the compiler and the debugger would work well enough together that I could just say: I now want a trace (including parameters) of every call to modules M, M', ... and would get it without too much fiddling. This is in my eyes what debuggers are (should be) good for. > and it is much easier to trace through > the algorithm step by step (using conditional breaks when necessary). > It is particularly handy to use a debugger when interfacing to other > people's component libraries. That being said, trace messages are > usually very efficient too. They are. But why do I have to insert them by hand instead of attach them via a suitable source level debugger? > cavat: I have found debuggers more useful in languages like C++ than > Ada, but then again Visual Studios has an excellent debugger. And the gnat-gdb is notoriously bad. My experience generally is the same. Of course, I don't need a debugger this often in other languages. The C debuggers are often rather good (due to the close correspondence between generated machine code and source), the Gnat gdb was nuisance and the ocaml debugger was impressive (but i don't need it so often, since my development style there is much more incremental -- continous testing and recompilation comes much more natural in functional languages IMHO). Regards -- Markus