This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 4/4] Add $_ada_exception convenience variable
> From: Tom Tromey <tromey@adacore.com>
> Cc: Tom Tromey <tromey@adacore.com>
> Date: Thu, 27 Jun 2019 08:52:35 -0600
>
> diff --git a/gdb/NEWS b/gdb/NEWS
> index 2cc82e86560..7379fd78b41 100644
> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -25,6 +25,9 @@
> provide the exitcode or exit status of the shell commands launched by
> GDB commands such as "shell", "pipe" and "make".
>
> +* New convenience variable $_ada_exception holds the address of the
> + Ada exception being thrown. This is set by Ada-related catchpoints.
> +
This part is OK.
> diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
> index 55be2ef6920..1a69c444e37 100644
> --- a/gdb/doc/gdb.texinfo
> +++ b/gdb/doc/gdb.texinfo
> @@ -4695,10 +4695,18 @@ 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}.
>
> +The convenience variable @code{$_ada_exception} holds the address of
> +the exception being thrown. This can be useful when setting a
> +condition for such a catchpoint.
> +
> @item exception unhandled
> @kindex catch exception unhandled
> An exception that was raised but is not handled by the program.
>
> +The convenience variable @code{$_ada_exception} holds the address of
> +the exception being thrown. This can be useful when setting a
> +condition for such a catchpoint.
> +
> @item handlers @r{[}@var{name}@r{]}
> @kindex catch handlers
> @cindex Ada exception handlers catching
> @@ -4719,9 +4727,14 @@ user-defined one. For instance, assuming an exception called
> command to use to catch such exceptions handling is
> @kbd{catch handlers Pck.Constraint_Error}.
>
> +The convenience variable @code{$_ada_exception} holds the address of
> +the exception being thrown. This can be useful when setting a
> +condition for such a catchpoint.
Here I wonder why we need to have the exact same text 3 times within
less than 25 lines. Can't we say this only once?
Otherwise the documentation parts are fine, thanks.