diff options
author | Phil Muldoon <pmuldoon@redhat.com> | 2009-06-15 12:11:37 +0000 |
---|---|---|
committer | Phil Muldoon <pmuldoon@redhat.com> | 2009-06-15 12:11:37 +0000 |
commit | 7cd1089b09663f833a90a4536db2ffad3591636b (patch) | |
tree | ea5adc0bb69efa19f2aa28a7687493bfdf7f7dfe /gdb/doc | |
parent | 1316c8b37f7e034b92e26695eea207e9a4cf25a0 (diff) | |
download | gdb-7cd1089b09663f833a90a4536db2ffad3591636b.zip gdb-7cd1089b09663f833a90a4536db2ffad3591636b.tar.gz gdb-7cd1089b09663f833a90a4536db2ffad3591636b.tar.bz2 |
2009-06-15 Phil Muldoon <pmuldoon@redhat.com>
* infcall.c (show_unwind_on_terminating_exception_p): New
function.
(call_function_by_hand): Create breakpoint and clean-up call for
std::terminate.breakpoint. Add unwind_on_terminating_exception_p
gate. Pop frame on breakpoint hit.
(_initialize_infcall): Add add_setshow_boolean_cmd for
unwind-on-terminating-exception.
testsuite/
2009-06-15 Phil Muldoon <pmuldoon@redhat.com>
* gdb.cp/gdb2495.cc: New file.
* gdb.cp/gdb2495.exp: New file.
doc/
2009-06-15 Phil Muldoon <pmuldoon@redhat.com>
* doc/gdb.texinfo (Calling): Document
set-unwind-on-terminating-exception usage.
Diffstat (limited to 'gdb/doc')
-rw-r--r-- | gdb/doc/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/doc/gdb.texinfo | 27 |
2 files changed, 32 insertions, 0 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index ff1ffd0..972e458 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,8 @@ +2009-06-15 Phil Muldoon <pmuldoon@redhat.com> + + * doc/gdb.texinfo (Calling): Document + set-unwind-on-terminating-exception usage. + 2009-06-11 Pedro Alves <pedro@codesourcery.com> * gdb.texinfo (All-Stop): Document new 'set schedule-multiple' diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index c4459e3..94852ec 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -12895,6 +12895,16 @@ It is possible for the function you call via the @code{print} or the function, or if you passed it incorrect arguments). What happens in that case is controlled by the @code{set unwindonsignal} command. +Similarly, with a C@t{++} program it is possible for the function you +call via the @code{print} or @code{call} command to generate an +exception that is not handled due to the constraints of the dummy +frame. In this case, any exception that is raised in the frame, but has +an out-of-frame exception handler will not be found. GDB builds a +dummy-frame for the inferior function call, and the unwinder cannot +seek for exception handlers outside of this dummy-frame. What happens +in that case is controlled by the +@code{set unwind-on-terminating-exception} command. + @table @code @item set unwindonsignal @kindex set unwindonsignal @@ -12911,6 +12921,23 @@ received. @kindex show unwindonsignal Show the current setting of stack unwinding in the functions called by @value{GDBN}. + +@item set unwind-on-terminating-exception +@kindex set unwind-on-terminating-exception +@cindex unwind stack in called functions with unhandled exceptions +@cindex call dummy stack unwinding on unhandled exception. +Set unwinding of the stack if a C@t{++} exception is raised, but left +unhandled while in a function that @value{GDBN} called in the program being +debugged. If set to on (the default), @value{GDBN} unwinds the stack +it created for the call and restores the context to what it was before +the call. If set to off, @value{GDBN} the exception is delivered to +the default C@t{++} exception handler and the inferior terminated. + +@item show unwind-on-terminating-exception +@kindex show unwind-on-terminating-exception +Show the current setting of stack unwinding in the functions called by +@value{GDBN}. + @end table @cindex weak alias functions |