Update help text in ada-lang.c

Message ID 20190603153103.25272-1-tromey@adacore.com
State New, archived
Headers

Commit Message

Tom Tromey June 3, 2019, 3:31 p.m. UTC
  I noticed that the "catch assert" help text erroneously claimed to
accept an argument, and while fixing this I went ahead and added
"Usage" text and made other minor updates to the commands in
ada-lang.c.

Tested on x86-64 Fedora 29.

gdb/ChangeLog
2019-06-03  Tom Tromey  <tromey@adacore.com>

	* ada-lang.c (_initialize_ada_language): Update help text.
---
 gdb/ChangeLog  |  4 ++++
 gdb/ada-lang.c | 18 +++++++++++++-----
 2 files changed, 17 insertions(+), 5 deletions(-)
  

Comments

Tom Tromey June 10, 2019, 1:55 p.m. UTC | #1
>>>>> "Tom" == Tom Tromey <tromey@adacore.com> writes:

Tom> I noticed that the "catch assert" help text erroneously claimed to
Tom> accept an argument, and while fixing this I went ahead and added
Tom> "Usage" text and made other minor updates to the commands in
Tom> ada-lang.c.

I'm checking this in.

Tom
  

Patch

diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 99c099aa07d..5fc926429ea 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -14408,14 +14408,15 @@  overloads selection menu is activated"),
 
   add_catch_command ("exception", _("\
 Catch Ada exceptions, when raised.\n\
-Usage: catch exception [ ARG ]\n\
-\n\
+Usage: catch exception [ARG] [if CONDITION]\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."),
+raised is the same as ARG.\n\
+CONDITION is a boolean expression that is evaluated to see whether the\n\
+exception should cause a stop."),
 		     catch_ada_exception_command,
 		     catch_ada_completer,
 		     CATCH_PERMANENT,
@@ -14423,14 +14424,20 @@  raised is the same as ARG."),
 
   add_catch_command ("handlers", _("\
 Catch Ada exceptions, when handled.\n\
-With an argument, catch only exceptions with the given name."),
+Usage: catch handlers [ARG] [if CONDITION]\n\
+Without any argument, stop when any Ada exception is handled.\n\
+With an argument, catch only exceptions with the given name.\n\
+CONDITION is a boolean expression that is evaluated to see whether the\n\
+exception should cause a stop."),
 		     catch_ada_handlers_command,
                      catch_ada_completer,
 		     CATCH_PERMANENT,
 		     CATCH_TEMPORARY);
   add_catch_command ("assert", _("\
 Catch failed Ada assertions, when raised.\n\
-With an argument, catch only exceptions with the given name."),
+Usage: catch assert [if CONDITION]\n\
+CONDITION is a boolean expression that is evaluated to see whether the\n\
+exception should cause a stop."),
 		     catch_assert_command,
                      NULL,
 		     CATCH_PERMANENT,
@@ -14448,6 +14455,7 @@  and exceeds this limit will cause an error."),
   add_info ("exceptions", info_exceptions_command,
 	    _("\
 List all Ada exception names.\n\
+Usage: info exceptions [REGEXP]\n\
 If a regular expression is passed as an argument, only those matching\n\
 the regular expression are listed."));