This is the mail archive of the gdb-cvs@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]

[binutils-gdb] expand a bit the in-GDB help for the "catch exception" help text


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=60a90376792474224f3d22b1d9813844a3b3589a

commit 60a90376792474224f3d22b1d9813844a3b3589a
Author: Joel Brobecker <brobecker@adacore.com>
Date:   Sat Jan 12 09:47:58 2019 -0500

    expand a bit the in-GDB help for the "catch exception" help text
    
    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), only stop when the exception
     | being raised does not have a handler (and will therefore lead to the task's
     | termination).
     | 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.

Diff:
---
 gdb/ChangeLog  | 5 +++++
 gdb/ada-lang.c | 9 ++++++++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index e0b47b4..29b525a 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2019-10-12  Joel Brobecker  <brobecker@adacore.com>
+
+	* ada-lang.c (_initialize_ada_language): Expand the help text
+	for the "catch exception" command.
+
 2019-01-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
 
 	* symtab.c (matching_obj_sections): Initialize obj,
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,


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