aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorPhil Muldoon <pmuldoon@redhat.com>2009-10-01 20:09:21 +0000
committerPhil Muldoon <pmuldoon@redhat.com>2009-10-01 20:09:21 +0000
commit2f2da8f6fb6aeb4a624bae53099ea60ff9931172 (patch)
treed99516aa01a1844457efcdda9b13406bcd4b6b7a /gdb
parenteb503a00aff025a4ad4aaf2e027fbeb86e23bd17 (diff)
downloadgdb-2f2da8f6fb6aeb4a624bae53099ea60ff9931172.zip
gdb-2f2da8f6fb6aeb4a624bae53099ea60ff9931172.tar.gz
gdb-2f2da8f6fb6aeb4a624bae53099ea60ff9931172.tar.bz2
2009-10-01 Phil Muldoon <pmuldoon@redhat.com>
* infcall.c (call_function_by_hand): Add a new cleanup branch for std::terminate breakpoints.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/infcall.c8
2 files changed, 12 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index e3196bc..366f0f0 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2009-10-01 Phil Muldoon <pmuldoon@redhat.com>
+
+ * infcall.c (call_function_by_hand): Add a new cleanup branch for
+ std::terminate breakpoints.
+
2009-09-29 Jan Kratochvil <jan.kratochvil@redhat.com>
* ia64-tdep.c (ia64_convert_from_func_ptr_addr): New variable buf.
diff --git a/gdb/infcall.c b/gdb/infcall.c
index c9d98cf..277399a 100644
--- a/gdb/infcall.c
+++ b/gdb/infcall.c
@@ -441,6 +441,7 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
struct gdbarch *gdbarch;
struct breakpoint *terminate_bp = NULL;
struct minimal_symbol *tm;
+ struct cleanup *terminate_bp_cleanup = NULL;
ptid_t call_thread_ptid;
struct gdb_exception e;
const char *name;
@@ -772,7 +773,7 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
/* Register a clean-up for unwind_on_terminating_exception_breakpoint. */
if (terminate_bp)
- make_cleanup_delete_breakpoint (terminate_bp);
+ terminate_bp_cleanup = make_cleanup_delete_breakpoint (terminate_bp);
/* - SNIP - SNIP - SNIP - SNIP - SNIP - SNIP - SNIP - SNIP - SNIP -
If you're looking to implement asynchronous dummy-frames, then
@@ -987,6 +988,11 @@ When the function is done executing, GDB will silently stop."),
internal_error (__FILE__, __LINE__, _("... should not be here"));
}
+ /* If we get here and the std::terminate() breakpoint has been set,
+ it has to be cleaned manually. */
+ if (terminate_bp)
+ do_cleanups (terminate_bp_cleanup);
+
/* If we get here the called FUNCTION ran to completion,
and the dummy frame has already been popped. */