Properly rethrow exception. This fixes errors
authorVladimir Prus <vladimir@codesourcery.com>
Fri, 1 Feb 2008 06:47:20 +0000 (06:47 +0000)
committerVladimir Prus <vladimir@codesourcery.com>
Fri, 1 Feb 2008 06:47:20 +0000 (06:47 +0000)
about non-existent functions for -break-insert.
        * breakpoint.c (break_command_really): Use throw_exception
        for rethrowing.  If rethrowing, don't print the exception.

gdb/ChangeLog
gdb/breakpoint.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.mi/mi-break.exp

index 4cfe1fbf5cbf85ee44a666812d33773cba2f9d6e..7ddc112caf2ba1a9935ba64a7cb1688001857106 100644 (file)
@@ -1,3 +1,10 @@
+2008-02-01  Vladimir Prus  <vladimir@codesourcery.com>
+
+       Properly rethrow exception.  This fixes errors
+       about non-existent functions for -break-insert.
+        * breakpoint.c (break_command_really): Use throw_exception
+        for rethrowing.  If rethrowing, don't print the exception.
+
 2008-01-31  Thiago Jung Bauermann  <bauerman@br.ibm.com>
 
        * NEWS: Mention Decimal Floating Point support.
index 0bed4efa0285ad2c51e0a3fe33e3a9b711bb70a3..f69002c99b351a6d501170847c93a5a35636e73e 100644 (file)
@@ -5330,13 +5330,13 @@ break_command_really (char *arg, char *cond_string, int thread,
        {
        case NOT_FOUND_ERROR:
 
-         exception_print (gdb_stderr, e);
-
          /* If pending breakpoint support is turned off, throw
             error.  */
 
          if (pending_break_support == AUTO_BOOLEAN_FALSE)
-           deprecated_throw_reason (RETURN_ERROR);
+           throw_exception (e);
+
+         exception_print (gdb_stderr, e);
 
           /* If pending breakpoint support is auto query and the user
             selects no, then simply return the error code.  */
index e39f566659e12fa7fd5861734e5f9dc863eb3ec4..99a21e3edbe0d7fceee171a4933fe94875ed058e 100644 (file)
@@ -1,3 +1,8 @@
+2008-02-01  Vladimir Prus  <vladimir@codesourcery.com>
+
+       * gdb.mi/mi-break.exp (test_error): New.
+       Call it.
+
 2008-01-31  Luis Machado  <luisgpm@br.ibm.com>
 
        * gdb.arch/ppc64-atomic-inst.c: New testcase source file.
index af438b9c5d61294f72fc541ac090311b333eb480..6933a34203a8d363b36db4f2e4b4a65536ec60e0 100644 (file)
@@ -175,10 +175,20 @@ proc test_ignore_count {} {
     }  
 }
 
+proc test_error {} {
+    global mi_gdb_prompt
+
+    mi_gdb_test "-break-insert function_that_does_not_exist" \
+        ".*\\^error,msg=\"Function \\\\\"function_that_does_not_exist\\\\\" not defined.\"" \
+        "breakpoint at nonexistent function"
+}
+
 test_tbreak_creation_and_listing
 test_rbreak_creation_and_listing
 
 test_ignore_count
 
+test_error
+
 mi_gdb_exit
 return 0