comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: GDB - El Capitan
Date: Sat, 17 Oct 2015 08:38:55 +0100
Date: 2015-10-17T08:38:55+01:00	[thread overview]
Message-ID: <lyy4f2uepc.fsf@pushface.org> (raw)
In-Reply-To: ly37xawwek.fsf@pushface.org

Simon Wright <simon@pushface.org> writes:

> Has anyone managed to get the AdaCore GDB to catch exceptions on El
> Capitan?
>
> The problem I reported back in 2011 at [1] is still there. The 'p
> __gnat_debug_raise_exception' trick no longer works; the '-readnow'
> trick at least lets you say 'catch exception', but if you try to catch a
> specific exception it then reports
>
>    (gdb) catch exception constraint_error
>    warning: failed to reevaluate internal exception condition for
>    catchpoint 0: A syntax error in expression, near `e) = long_integer
>    (&standard.constraint_error)'.  Catchpoint 1: `constraint_error' Ada
>    exception
>
> and stops on all exceptions (I think it actually gets hung up, so 'c'
> ends up at the same place).
>
> At least this time it fails in the same way with GNAT GDB 2015, so we
> *may* get a hint from AdaCore.
>
> [1] https://sourceware.org/bugzilla/show_bug.cgi?id=11385

Aha!

The workround is to use the '-readnow' flag and to 'set language ada'
before 'catch exception'.

I guess that if you're debugging a mixed-language program you could then
'set language auto' ... hmm, no. Still, I'm saved from Put_Line's all
over the place!

  reply	other threads:[~2015-10-17  7:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-16 17:33 GDB - El Capitan Simon Wright
2015-10-17  7:38 ` Simon Wright [this message]
2015-10-17 17:42   ` Jeffrey R. Carter
2015-10-17 20:14     ` Simon Wright
replies disabled

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