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: border1.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.bbs-scene.org!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: GCC 4.8.1 for Mac OS X Date: Wed, 17 Jul 2013 22:00:40 +0100 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx05.eternal-september.org; posting-host="c8504a89c76ea11bda6664e6198ae3cd"; logging-data="3502"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18XMs01pRKiC7GsdaleeUCa0SEdFmFLSHI=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin) Cancel-Lock: sha1:DL2eU/LCvSlJLQujVzxAVmyGQOw= sha1:tqYSorVEvUEQWYOvDYBsJt2Mmu4= X-Original-Bytes: 3566 Xref: number.nntp.dca.giganews.com comp.lang.ada:182555 Date: 2013-07-17T22:00:40+01:00 List-Id: Felix Krause writes: > On 2013-07-07 18:37:02 +0000, Simon Wright said: > >> Tools included: ASIS, AUnit, GPRbuild, GNATColl, XMLAda from GNAT GPL >> 2013. > > Just noticed that there is no gdb included. Would be great to have > that. It does't seem to be possible to use the gdb from Apple, it > doesn't recognize things like "break exception". I am rather unsure > about how language support is compiled into gdb and how one would > compile a gdb that supports Ada. The system gdb is 6.3, and as you say doesn't understand Ada (BTW, the current usage is 'catch exception', not 'break exception'). GDB 7.6 builds with the GCC 4.8.1 I uploaded, with very little configuration needed (or possible): ../gdb-7.6/configure \ --prefix=/opt/gcc-4.8.1 \ --build=x86_64-apple-darwin12 but the resulting GDB isn't without its problems -- * it needs to be code-signed (but you can run it as root) * it needs to be kicked to realise that it can catch Ada exceptions, just like in [1] * it gets confused about exceptions, but seems to stumble its way through eventually * it doesn't demangle Ada subprogram names properly -- see [2]. I used to use the GDB that comes with GNAT GPL, but I see that the GPL 2013 version has exactly the same problems I noted above! Bug report required, I think. [1] http://forward-in-code.blogspot.co.uk/2012/01/catching-exceptions-in-gdb.html [2] (gdb) catch exception name_error Your Ada runtime appears to be missing some debugging information. Cannot insert Ada exception catchpoint in this configuration. (gdb) print __gnat_debug_raise_exception $1 = {} 0x10017d4dd <__gnat_debug_raise_exception> (gdb) catch exception name_error warning: failed to reevaluate internal exception condition for catchpoint 0: A syntax error in expression, near `e) = long_integer (&name_error)'. Catchpoint 1: `name_error' Ada exception (gdb) run foo.uml Starting program: /Users/simon/coldframe/tools/normalize_xmi foo.uml warning: failed to reevaluate internal exception condition for catchpoint 1: A syntax error in expression, near `e) = long_integer (&name_error)'. warning: failed to reevaluate internal exception condition for catchpoint 1: A syntax error in expression, near `e) = long_integer (&name_error)'. processing foo.uml Catchpoint 1, ADA.IO_EXCEPTIONS.NAME_ERROR at 0x000000010009b5f7 in _ada_normalize_xmi__main () at /Users/simon/coldframe/tools/normalize_xmi-main.adb:90 90 Input_Sources.File.Open (Arg, File_Source); (gdb)