comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: GCC 4.8.1 for Mac OS X
Date: Wed, 17 Jul 2013 22:00:40 +0100
Date: 2013-07-17T22:00:40+01:00	[thread overview]
Message-ID: <lyzjtkucjr.fsf@pushface.org> (raw)
In-Reply-To: ks6sul$dhm$1@online.de

Felix Krause <flyx@isobeef.org> 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 = {<text variable, no debug info>} 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) 


  reply	other threads:[~2013-07-17 21:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-07 18:37 GCC 4.8.1 for Mac OS X Simon Wright
2013-07-07 22:02 ` Bill Findlay
2013-07-08  7:25   ` Simon Wright
2013-07-08 17:57     ` Bill Findlay
2013-07-08 20:06 ` Felix Krause
2013-07-08 22:37   ` Simon Wright
2013-07-09 15:31     ` Felix Krause
2013-07-09 19:35       ` Simon Wright
2013-07-17 19:57 ` Felix Krause
2013-07-17 21:00   ` Simon Wright [this message]
2013-07-18 20:23     ` Simon Wright
2013-07-21  0:59 ` Michael Rohan
2013-07-21  1:06   ` Bill Findlay
2013-07-21  1:19     ` Michael Rohan
2013-07-21  3:57     ` Dennis Lee Bieber
2013-07-21 11:55   ` Simon Wright
2013-07-21 18:01     ` Michael Rohan
replies disabled

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