aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-04-15 17:27:44 +0000
committerTom Tromey <tromey@redhat.com>2013-04-15 17:27:44 +0000
commit591f19e89b4b671f1124cdc21605bba1d3d6b8d0 (patch)
tree0a343ae3b20cc917f9b528b6dd86fc16b05c64c1 /gdb/doc
parent02ae6bada6a291c3b71ceea392be196d768d86a4 (diff)
downloadgdb-591f19e89b4b671f1124cdc21605bba1d3d6b8d0.zip
gdb-591f19e89b4b671f1124cdc21605bba1d3d6b8d0.tar.gz
gdb-591f19e89b4b671f1124cdc21605bba1d3d6b8d0.tar.bz2
PR c++/12824:
* NEWS: Update. * breakpoint.c (enum exception_event_kind) <EX_EVENT_RETHROW>: New constant. (classify_exception_breakpoint): New function. (print_it_exception_catchpoint, print_one_exception_catchpoint) (print_mention_exception_catchpoint) (print_recreate_exception_catchpoint, handle_gnu_v3_exceptions) (catch_exception_command_1): Handle "rethrow" catchpoint. (catch_rethrow_command): New function. (_initialize_breakpoint): Add "catch rethrow" command. gdb/doc * gdb.texinfo (Set Catchpoints): Reorganize exception catchpoints. Document "catch rethrow". (Debugging C Plus Plus): Mention "catch rethrow". gdb/testsuite * gdb.cp/exception.exp: Add "catch rethrow" tests.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/ChangeLog6
-rw-r--r--gdb/doc/gdb.texinfo61
2 files changed, 43 insertions, 24 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 023d44b..08a61b6 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,5 +1,11 @@
2013-04-15 Tom Tromey <tromey@redhat.com>
+ * gdb.texinfo (Set Catchpoints): Reorganize exception
+ catchpoints. Document "catch rethrow".
+ (Debugging C Plus Plus): Mention "catch rethrow".
+
+2013-04-15 Tom Tromey <tromey@redhat.com>
+
* gdb.texinfo (Set Catchpoints): Remove obsolete text.
2013-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index f802116..1634113 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -4072,13 +4072,46 @@ shared library. Use the @code{catch} command to set a catchpoint.
@kindex catch
@item catch @var{event}
Stop when @var{event} occurs. @var{event} can be any of the following:
+
@table @code
@item throw
+@itemx rethrow
+@itemx catch
@cindex stop on C@t{++} exceptions
-The throwing of a C@t{++} exception.
+The throwing, re-throwing, or catching of a C@t{++} exception.
+
+There are currently some limitations to C@t{++} exception handling in
+@value{GDBN}:
+
+@itemize @bullet
+@item
+The support for these commands is system-dependent. Currently, only
+systems using the @samp{gnu-v3} C@t{++} ABI (@pxref{ABI}) are
+supported.
+
+@item
+When an exception-related catchpoint is hit, @value{GDBN} stops at a
+location in the system library which implements runtime exception
+support for C@t{++}, usually @code{libstdc++}. You can use @code{up}
+(@pxref{Selection}) to get to your code.
+
+@item
+If you call a function interactively, @value{GDBN} normally returns
+control to you when the function has finished executing. If the call
+raises an exception, however, the call may bypass the mechanism that
+returns control to you and cause your program either to abort or to
+simply continue running until it hits a breakpoint, catches a signal
+that @value{GDBN} is listening for, or exits. This is the case even if
+you set a catchpoint for the exception; catchpoints on exceptions are
+disabled within interactive calls. @xref{Calling}, for information on
+controlling this with @code{set unwind-on-terminating-exception}.
+
+@item
+You cannot raise an exception interactively.
-@item catch
-The catching of a C@t{++} exception.
+@item
+You cannot install an exception handler interactively.
+@end itemize
@item exception
@cindex Ada exception catching
@@ -4288,27 +4321,6 @@ automatically deleted after the first time the event is caught.
Use the @code{info break} command to list the current catchpoints.
-There are currently some limitations to C@t{++} exception handling
-(@code{catch throw} and @code{catch catch}) in @value{GDBN}:
-
-@itemize @bullet
-@item
-If you call a function interactively, @value{GDBN} normally returns
-control to you when the function has finished executing. If the call
-raises an exception, however, the call may bypass the mechanism that
-returns control to you and cause your program either to abort or to
-simply continue running until it hits a breakpoint, catches a signal
-that @value{GDBN} is listening for, or exits. This is the case even if
-you set a catchpoint for the exception; catchpoints on exceptions are
-disabled within interactive calls.
-
-@item
-You cannot raise an exception interactively.
-
-@item
-You cannot install an exception handler interactively.
-@end itemize
-
@node Delete Breaks
@subsection Deleting Breakpoints
@@ -13508,6 +13520,7 @@ classes.
@cindex C@t{++} exception handling
@item catch throw
+@itemx catch rethrow
@itemx catch catch
Debug C@t{++} exception handling using these commands. @xref{Set
Catchpoints, , Setting Catchpoints}.