public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [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.
@ 2008-10-22 14:43 pmuldoon
  0 siblings, 0 replies; only message in thread
From: pmuldoon @ 2008-10-22 14:43 UTC (permalink / raw)
  To: archer-commits

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 <pmuldoon@redhat.com>
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.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-10-22 14:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-22 14:43 [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 pmuldoon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).