This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2] (Ada) New command to stop at start of exception handlers.
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Xavier Roirand <roirand at adacore dot com>
- Cc: gdb-patches at sourceware dot org, brobecker at adacore dot com
- Date: Tue, 19 Dec 2017 18:32:59 +0200
- Subject: Re: [PATCH v2] (Ada) New command to stop at start of exception handlers.
- Authentication-results: sourceware.org; auth=none
- References: <1513693765-20655-1-git-send-email-roirand@adacore.com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> From: Xavier Roirand <roirand@adacore.com>
> Cc: Xavier Roirand <roirand@adacore.com>, brobecker@adacore.com
> Date: Tue, 19 Dec 2017 15:29:25 +0100
>
> diff --git a/gdb/NEWS b/gdb/NEWS
> index 44f481d..658d93a 100644
> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -665,6 +665,9 @@ show max-value-size
> * Support for reading/writing memory and extracting values on architectures
> whose memory is addressable in units of any integral multiple of 8 bits.
>
> +catch handlers
> + Allows to break when an Ada exception is handled.
> +
> * New remote packets
This part is OK.
> +@cindex Ada exception handle catching
You mean "handling", I believe, not "handle". Right?
> +@cindex catch Ada exceptions when handled
> +An Ada exception being handled. If an exception name is
> +specified at the end of the command (eg @code{catch exception Program_Error}),
"e.g.", and please use @kbd, not @code, when you mean something the
user types as input.
> +When inserting an handle 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 handling is
> +@kbd{catch handle Pck.Constraint_Error}.
This is OK Texinfo-wise, but I wonder whether this default is useful.
Why not default to the user-defined exception instead in such cases?
(I'm not an Ada programmer, so apologies if this makes no sense.)
The documentation parts are okay with the above nits fixed.