PR breakpoints/1450
authorDaniel Jacobowitz <drow@false.org>
Wed, 12 Nov 2003 17:00:42 +0000 (17:00 +0000)
committerDaniel Jacobowitz <drow@false.org>
Wed, 12 Nov 2003 17:00:42 +0000 (17:00 +0000)
* breakpoint.c (insert_bp_location): Fix a logic error by returning
0 after a catchpoint fails.

gdb/ChangeLog
gdb/breakpoint.c

index b185824aae6e68e5e5f852b06895a43cd282837e..5e32d4948004a847775edea100b5467c4db72aa8 100644 (file)
@@ -1,3 +1,9 @@
+2003-11-12  Daniel Jacobowitz  <drow@mvista.com>
+
+       PR breakpoints/1450
+       * breakpoint.c (insert_bp_location): Fix a logic error by returning
+       0 after a catchpoint fails.
+
 2003-11-11  Michael Chastain  <mec.gnu@mindspring.com>
 
        * mips-tdep.c (msymbol_size): Delete.
index 86d9f17423217a1248aad946465ccefce198f8bd..0e95e208cc352a324f9b0eefaa27f033e6140b1d 100644 (file)
@@ -1071,7 +1071,11 @@ insert_bp_location (struct bp_location *bpt,
        bpt->owner->enable_state = bp_disabled;
       else
        bpt->inserted = 1;
-      return val;
+
+      /* We've already printed an error message if there was a problem
+        inserting this catchpoint, and we've disabled the catchpoint,
+        so just return success.  */
+      return 0;
     }
 
   return 0;