diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2009-07-31 14:33:45 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2009-07-31 14:33:45 +0000 |
commit | 3a1bae8e7f6b90879682cbcd7391cb8493efb9a1 (patch) | |
tree | 79b0d57bcfb2af540a6bcbad21a7baf01bb0197d | |
parent | 8bea4e01db202d301348221cff486a4fe78e86a1 (diff) | |
download | gdb-3a1bae8e7f6b90879682cbcd7391cb8493efb9a1.zip gdb-3a1bae8e7f6b90879682cbcd7391cb8493efb9a1.tar.gz gdb-3a1bae8e7f6b90879682cbcd7391cb8493efb9a1.tar.bz2 |
* breakpoint.c (remove_breakpoints): If removing one breakpoint
location fails, still continue to remove other locations.
(remove_hw_watchpoints): Likewise.
(detach_breakpoints): Likewise.
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/breakpoint.c | 33 |
2 files changed, 16 insertions, 24 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index cc82712..05bddd2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,12 @@ 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. (disable_breakpoints_before_startup): Add prototype. (enable_breakpoints_after_startup): Likewise. diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 3e324c2..2e598e4 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -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 |