X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=gdb%2Fbreakpoint.c;h=6e863d7f4aecfa9bd1d5a4ac62c6c6baa58d679e;hb=5fbc17284d8c75ddd7c0a594d79916b5cf4590d3;hp=9454428522324f83dfa355d92d28f291226e4a32;hpb=de1b651cc0e9ab22f7a0bbe0235bfb7dd736aba7;p=pf3gnuchains%2Fpf3gnuchains4x.git diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 9454428522..6e863d7f4a 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -3054,6 +3054,7 @@ bpstat_stop_status (CORE_ADDR bp_addr, ptid_t ptid) /* Pointer to the last thing in the chain currently. */ bpstat bs = root_bs; int ix; + int need_remove_insert; ALL_BP_LOCATIONS (bl) { @@ -3146,6 +3147,7 @@ bpstat_stop_status (CORE_ADDR bp_addr, ptid_t ptid) if (bs->stop) break; + need_remove_insert = 0; if (bs == NULL) for (bs = root_bs->next; bs != NULL; bs = bs->next) if (!bs->stop @@ -3158,11 +3160,15 @@ bpstat_stop_status (CORE_ADDR bp_addr, ptid_t ptid) location is no longer used by the watchpoint. Prevent further code from trying to use it. */ bs->breakpoint_at = NULL; - remove_breakpoints (); - insert_breakpoints (); - break; + need_remove_insert = 1; } + if (need_remove_insert) + { + remove_breakpoints (); + insert_breakpoints (); + } + return root_bs->next; }