public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [RFA/doco] expand a bit the in-GDB help for the "catch exception" help text
@ 2019-01-11 14:23 Joel Brobecker
  2019-01-11 16:12 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Joel Brobecker @ 2019-01-11 14:23 UTC (permalink / raw)
  To: gdb-patches; +Cc: Eli Zaretskii

Hello,

One of our users remarked that the help doesn't mention the fact that
the "catch exception" supports the special argument "unhandled" to catch
exceptions which do not have a handler. This patch changes the output
of...

 | (gdb) help catch exception
 | Catch Ada exceptions, when raised.
 | With an argument, catch only exceptions with the given name.

... to ...

 | (gdb) help catch exception
 | Catch Ada exceptions, when raised.
 | Usage: catch exception [ ARG ]
 |
 | Without any argument, stop when any Ada exception is raised.
 | If ARG is "unhandled" (without the quotes), stop when an unhandledis raised.
 | Otherwise, the catchpoint only stops when the name of the exception being
 | raised is the same as ARG.

gdb/ChangeLog:

        * ada-lang.c (_initialize_ada_language): Expand the help text
        for the "catch exception" command.

Tested on x86_64-linux, no regression.

OK to push? Or any suggestions?

Thank you,
-- 
Joel

---
 gdb/ada-lang.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index f552f13..dbd258a 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -14508,7 +14508,14 @@ overloads selection menu is activated"),
 
   add_catch_command ("exception", _("\
 Catch Ada exceptions, when raised.\n\
-With an argument, catch only exceptions with the given name."),
+Usage: catch exception [ ARG ]\n\
+\n\
+Without any argument, stop when any Ada exception is raised.\n\
+If ARG is \"unhandled\" (without the quotes), only stop when the exception\n\
+being raised does not have a handler (and will therefore lead to the task's\n\
+termination).\n\
+Otherwise, the catchpoint only stops when the name of the exception being\n\
+raised is the same as ARG."),
 		     catch_ada_exception_command,
                      NULL,
 		     CATCH_PERMANENT,
-- 
2.1.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFA/doco] expand a bit the in-GDB help for the "catch exception" help text
  2019-01-11 14:23 [RFA/doco] expand a bit the in-GDB help for the "catch exception" help text Joel Brobecker
@ 2019-01-11 16:12 ` Eli Zaretskii
  2019-01-12 14:50   ` pushed: " Joel Brobecker
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2019-01-11 16:12 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: gdb-patches

> From: Joel Brobecker <brobecker@adacore.com>
> Cc: Eli Zaretskii <eliz@gnu.org>
> Date: Fri, 11 Jan 2019 09:22:51 -0500
> 
>  | (gdb) help catch exception
>  | Catch Ada exceptions, when raised.
>  | Usage: catch exception [ ARG ]
>  |
>  | Without any argument, stop when any Ada exception is raised.
>  | If ARG is "unhandled" (without the quotes), stop when an unhandledis raised.
>  | Otherwise, the catchpoint only stops when the name of the exception being
>  | raised is the same as ARG.
> 
> gdb/ChangeLog:
> 
>         * ada-lang.c (_initialize_ada_language): Expand the help text
>         for the "catch exception" command.
> 
> Tested on x86_64-linux, no regression.
> 
> OK to push? Or any suggestions?

The text you propose LGTM, thanks (the text above includes a typo, but
the source patch gets it right).

^ permalink raw reply	[flat|nested] 3+ messages in thread

* pushed: [RFA/doco] expand a bit the in-GDB help for the "catch exception" help text
  2019-01-11 16:12 ` Eli Zaretskii
@ 2019-01-12 14:50   ` Joel Brobecker
  0 siblings, 0 replies; 3+ messages in thread
From: Joel Brobecker @ 2019-01-12 14:50 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: gdb-patches

> > gdb/ChangeLog:
> > 
> >         * ada-lang.c (_initialize_ada_language): Expand the help text
> >         for the "catch exception" command.
> > 
> > Tested on x86_64-linux, no regression.
> > 
> > OK to push? Or any suggestions?
> 
> The text you propose LGTM, thanks (the text above includes a typo, but
> the source patch gets it right).

Indeed; I accidently copy/pasted an old version of the text into
the commit log! The version I pushed has the correct text.

Thank you Eli!
-- 
Joel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-01-12 14:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-11 14:23 [RFA/doco] expand a bit the in-GDB help for the "catch exception" help text Joel Brobecker
2019-01-11 16:12 ` Eli Zaretskii
2019-01-12 14:50   ` pushed: " Joel Brobecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).