diff options
author | Tom Tromey <tromey@redhat.com> | 2013-04-15 18:09:02 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2013-04-15 18:09:02 +0000 |
commit | 72f1fe8a88c4dc9219c4263eff2bbcf61173e607 (patch) | |
tree | a0500c8be84baf95cff28fb6f70b240be4de4f44 /gdb/doc | |
parent | fc4746a2bd1dbe2a0fd983af292568a7ee05517f (diff) | |
download | gdb-72f1fe8a88c4dc9219c4263eff2bbcf61173e607.zip gdb-72f1fe8a88c4dc9219c4263eff2bbcf61173e607.tar.gz gdb-72f1fe8a88c4dc9219c4263eff2bbcf61173e607.tar.bz2 |
PR c++/15176:
* NEWS: Update.
* break-catch-throw.c (compute_exception): New function.
(exception_funcs): New global.
(_initialize_break_catch_throw): Create $_exception.
* cp-abi.c (cplus_type_from_type_info): New function.
* cp-abi.h (cplus_type_from_type_info): Declare.
(struct cp_abi_ops) <get_type_from_type_info>: New field.
* gnu-v3-abi.c (gnuv3_get_typename_from_type_info)
(gnuv3_get_type_from_type_info): New functions.
(init_gnuv3_ops): Set get_type_from_type_info ABI field.
gdb/doc
* gdb.texinfo (Set Catchpoints): Document $_exception.
(Convenience Vars): Mention $_exception.
gdb/testsuite
* gdb.base/default.exp: Update for $_exception.
* gdb.cp/exceptprint.cc: New file.
* gdb.cp/exceptprint.exp: New file.
* lib/gdb.exp (skip_libstdcxx_probe_tests): New proc.
Diffstat (limited to 'gdb/doc')
-rw-r--r-- | gdb/doc/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/doc/gdb.texinfo | 18 |
2 files changed, 23 insertions, 0 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 08a61b6..e1904aa 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,5 +1,10 @@ 2013-04-15 Tom Tromey <tromey@redhat.com> + * gdb.texinfo (Set Catchpoints): Document $_exception. + (Convenience Vars): Mention $_exception. + +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". diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 1634113..cba3a2f 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -4080,6 +4080,11 @@ Stop when @var{event} occurs. @var{event} can be any of the following: @cindex stop on C@t{++} exceptions The throwing, re-throwing, or catching of a C@t{++} exception. +@vindex $_exception@r{, convenience variable} +The convenience variable @code{$_exception} is available at an +exception-related catchpoint, on some systems. This holds the +exception being thrown. + There are currently some limitations to C@t{++} exception handling in @value{GDBN}: @@ -4090,6 +4095,15 @@ systems using the @samp{gnu-v3} C@t{++} ABI (@pxref{ABI}) are supported. @item +The @code{$_exception} convenience variable relies on the presence of +some SDT probes in @code{libstdc++}. If these probes are not present, +then this variable cannot be used. + +@item +The @code{$_exception} convenience variable is only valid at the +instruction at which an exception-related catchpoint is set. + +@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} @@ -9510,6 +9524,10 @@ to match the format in which the data was printed. The variable @code{$_exitcode} is automatically set to the exit code when the program being debugged terminates. +@item $_exception +The variable @code{$_exception} is set to the exception object being +thrown at an exception-related catchpoint. @xref{Set Catchpoints}. + @item $_probe_argc @itemx $_probe_arg0@dots{}$_probe_arg11 Arguments to a static probe. @xref{Static Probe Points}. |