* breakpoint.c (remove_breakpoints): If removing one breakpoint
authorUlrich Weigand <uweigand@de.ibm.com>
Fri, 31 Jul 2009 14:33:45 +0000 (14:33 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Fri, 31 Jul 2009 14:33:45 +0000 (14:33 +0000)
location fails, still continue to remove other locations.
(remove_hw_watchpoints): Likewise.
(detach_breakpoints): Likewise.

gdb/ChangeLog
gdb/breakpoint.c

index cc827123ae55054223c0f7b2310d73f138130278..05bddd2514c13a0ca9bd4a0e035a6e1083cd0e83 100644 (file)
@@ -1,3 +1,10 @@
+2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * breakpoint.c (remove_breakpoints): If removing one breakpoint
+       location fails, still continue to remove other locations.
+       (remove_hw_watchpoints): Likewise.
+       (detach_breakpoints): Likewise.
+
 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * breakpoint.h (enum enable_state): Add bp_startup_disabled.
index 3e324c2dbffded16dbef0137c42434314e3fbc2f..2e598e421eed2325af42de6eccda46c27b97609b 100644 (file)
@@ -1409,36 +1409,28 @@ int
 remove_breakpoints (void)
 {
   struct bp_location *b;
-  int val;
+  int val = 0;
 
   ALL_BP_LOCATIONS (b)
   {
     if (b->inserted)
-      {
-       val = remove_breakpoint (b, mark_uninserted);
-       if (val != 0)
-         return val;
-      }
+      val |= remove_breakpoint (b, mark_uninserted);
   }
-  return 0;
+  return val;
 }
 
 int
 remove_hw_watchpoints (void)
 {
   struct bp_location *b;
-  int val;
+  int val = 0;
 
   ALL_BP_LOCATIONS (b)
   {
     if (b->inserted && b->loc_type == bp_loc_hardware_watchpoint)
-      {
-       val = remove_breakpoint (b, mark_uninserted);
-       if (val != 0)
-         return val;
-      }
+      val |= remove_breakpoint (b, mark_uninserted);
   }
-  return 0;
+  return val;
 }
 
 int
@@ -1663,7 +1655,7 @@ int
 detach_breakpoints (int pid)
 {
   struct bp_location *b;
-  int val;
+  int val = 0;
   struct cleanup *old_chain = save_inferior_ptid ();
 
   if (pid == PIDGET (inferior_ptid))
@@ -1674,17 +1666,10 @@ detach_breakpoints (int pid)
   ALL_BP_LOCATIONS (b)
   {
     if (b->inserted)
-      {
-       val = remove_breakpoint (b, mark_inserted);
-       if (val != 0)
-         {
-           do_cleanups (old_chain);
-           return val;
-         }
-      }
+      val |= remove_breakpoint (b, mark_inserted);
   }
   do_cleanups (old_chain);
-  return 0;
+  return val;
 }
 
 static int
This page took 0.049245 seconds and 4 git commands to generate.