Daniel Jacobowitz <d...@debian.org> writes:

> On Mon, Dec 28, 2009 at 03:09:10PM +0000, Debian Bug Tracking System wrote:
>> Processing commands for cont...@bugs.debian.org:
>> 
>> > reassign 562766 gdb
>> Bug #562766 [gnat-4.4] gdb does not support 'break exception'
>> Bug reassigned from package 'gnat-4.4' to 'gdb'.
>> Bug No longer marked as found in versions gnat-4.4/4.4.2-4.
>
> I'm confused by this reassignment.  Does "catch throw" work, as
> Ludovic wrote in the bug report?  If so, is this a bug in the GNAT
> documentation rather than GDB?

I believe the GNAT User's Guide is out of sync with the GDB manual and
moreover, GNAT should not attempt to describe GDB, so let's ignore the
GNAT User's Guide for now.

The GDB 7.0 manual documents the "catch" command with these relevant
arguments:

    @item throw
    @cindex stop on c...@t{++} exceptions
    The throwing of a c...@t{++} exception.

    @item catch
    The catching of a c...@t{++} exception.

    @item exception
    @cindex Ada exception catching
    @cindex catch Ada exceptions
    An Ada exception being raised.  If an exception name is specified
    at the end of the command (eg @code{catch exception Program_Error}),
    the debugger will stop only when this specific exception is raised.
    Otherwise, the debugger stops execution when any Ada exception is raised.

    When inserting an exception catchpoint on a user-defined exception whose
    name is identical to one of the exceptions defined by the language, the
    fully qualified name must be used as the exception name.  Otherwise,
    @value{GDBN} will assume that it should stop on the pre-defined exception
    rather than the user-defined one.  For instance, assuming an exception
    called @code{Constraint_Error} is defined in package @code{Pck}, then
    the command to use to catch such exceptions is @kbd{catch exception
    Pck.Constraint_Error}.

    @item exception unhandled
    An exception that was raised but is not handled by the program.

    @item assert
    A failed Ada assertion.

Therefore, the following commands ought to work in GDB 7.0 but don't:

catch exception <Exception_Name>
catch exception
catch exception unhandled
catch assert

In contrast,

catch throw

works but it is impossible to specify the name of an Ada exception; this
is roughly equivalent to "catch exception" without an argument, so this
is only a partial solution.

The bug is real, sadly :)

-- 
Ludovic Brenta.



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to