From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12612 invoked by alias); 22 Oct 2008 14:43:42 -0000 Mailing-List: contact archer-commits-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: Received: (qmail 12586 invoked by uid 9514); 22 Oct 2008 14:43:41 -0000 Date: Wed, 22 Oct 2008 14:43:00 -0000 Message-ID: <20081022144341.12570.qmail@sourceware.org> From: pmuldoon@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] archer-pmuldoon-exception-rewind: Adjust several user-facing text output strings. Fix formatting. Register clean-up directly after breakpoint creation. Adjust tests for new strings. X-Git-Refname: refs/heads/archer-pmuldoon-exception-rewind X-Git-Reftype: branch X-Git-Oldrev: 453d3c636d58238b290d9ddc85e369a354279de6 X-Git-Newrev: 13774f62ebfc5012886fed8b10f42d2eca0cdcf6 X-SW-Source: 2008-q4/txt/msg00034.txt.bz2 List-Id: The branch, archer-pmuldoon-exception-rewind has been updated via 13774f62ebfc5012886fed8b10f42d2eca0cdcf6 (commit) from 453d3c636d58238b290d9ddc85e369a354279de6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 13774f62ebfc5012886fed8b10f42d2eca0cdcf6 Author: Phil Muldoon Date: Wed Oct 22 15:43:18 2008 +0100 Adjust several user-facing text output strings. Fix formatting. Register clean-up directly after breakpoint creation. Adjust tests for new strings. ----------------------------------------------------------------------- Summary of changes: gdb/infcall.c | 28 +++++++++------------------- gdb/testsuite/gdb.cp/gdb2495.exp | 2 +- 2 files changed, 10 insertions(+), 20 deletions(-) First 500 lines of diff: diff --git a/gdb/infcall.c b/gdb/infcall.c index 95e99ea..5749d20 100644 --- a/gdb/infcall.c +++ b/gdb/infcall.c @@ -102,7 +102,7 @@ Unwinding of stack if a signal is received while in a call dummy is %s.\n"), The default is to unwind the frame if a std::terminate call is made.. */ -int unwind_on_terminating_exception_p = 1; +static int unwind_on_terminating_exception_p = 1; static void show_unwind_on_terminating_exception_p (struct ui_file *file, int from_tty, struct cmd_list_element *c, @@ -110,8 +110,7 @@ show_unwind_on_terminating_exception_p (struct ui_file *file, int from_tty, { fprintf_filtered (file, _("\ -Unwinding of stack from a std::terminate call originating from \ -default C++ exception handler is %s.\n"), +Unwind stack if a C++ exception is unhandled while in a call dummy is %s.\n"), value); } @@ -695,6 +694,7 @@ call_function_by_hand (struct value *function, int nargs, struct value **args) if (tm != NULL) terminate_bp = set_momentary_breakpoint_at_pc (SYMBOL_VALUE_ADDRESS (tm), bp_breakpoint); + make_cleanup_delete_breakpoint (terminate_bp); } /* Execute a "stack dummy", a piece of code stored in the stack by @@ -744,10 +744,6 @@ call_function_by_hand (struct value *function, int nargs, struct value **args) discard_cleanups (old_cleanups); } - /* Only clean up terminating exception breakpoint if it was set */ - if (terminate_bp != NULL) - make_cleanup_delete_breakpoint (terminate_bp); - if (stopped_by_random_signal || !stop_stack_dummy) { /* Find the name of the function we're about to complain about. */ @@ -846,9 +842,9 @@ Evaluation of the expression containing the function (%s) will be abandoned."), The program being debugged entered a std::terminate call which would\n\ have terminated the program being debugged. GDB has restored the\n\ context to what it was before the call.\n\ -To change this behaviour use \"set unwind-on-terminating-exception \ -off\"\n\ -Evaluation of the expression containing the function (%s) will be abandoned."), name); +To change this behaviour use \"set unwind-on-terminating-exception off\"\n\ +Evaluation of the expression containing the function (%s) will be abandoned."), + name); } } discard_cleanups (inf_status_cleanup); @@ -958,15 +954,9 @@ Set unwinding of stack if a std::terminate() call originates from\n\ the default C++ exception handler."), _("\ Show unwinding of stack if a std::terminate() call originates from\n\ the default C++ exception handler."), _("\ -The unwind-on-terminating-exception lets the user determine what\n\ -gdb should do if a std::terminate() call is made from the default\n\ -exception handler due to no in-frame handler in the dummy frame.\n\ -C++ exceptions are often handled out-of-frame, but the constraints\n\ -of the call-dummy can fool the unwinder into thinking there is no\n\ -exception handler, and calls the default handler. This in turns\n\ -calls std::terminate, which will terminate the inferior.\n\ -If set, gdb unwinds the stack and restores the context to what it\n\ -was before the call.\n\ +The unwind on terminating exception flag lets the user determine\n\ +what gdb should do if a std::terminate() call is made from the\n\ +default exception handler.\n\ The default is to unwind the frame."), NULL, show_unwind_on_terminating_exception_p, diff --git a/gdb/testsuite/gdb.cp/gdb2495.exp b/gdb/testsuite/gdb.cp/gdb2495.exp index beb744c..5afeb1b 100644 --- a/gdb/testsuite/gdb.cp/gdb2495.exp +++ b/gdb/testsuite/gdb.cp/gdb2495.exp @@ -106,7 +106,7 @@ gdb_expect { # Check that it is turned off ... gdb_test "show unwind-on-terminating-exception" \ - "exception handler is off.*" \ + "exception is unhandled while in a call dummy is off.*" \ "Turn off unwind on terminating exception flag" # Check that the old behaviour is restored. hooks/post-receive -- Repository for Project Archer.