This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2] (Ada) New command to stop at start of exception handlers.


> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]