aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.c
diff options
context:
space:
mode:
authorDavid Daney <ddaney@avtrex.com>2008-09-16 18:55:01 +0000
committerDavid Daney <ddaney@avtrex.com>2008-09-16 18:55:01 +0000
commitd832cb68fbbd28120e6311f77e9564d91bc18bee (patch)
treead2f78565b7fd846b12a1cbd7b3e253b7b76a119 /gdb/breakpoint.c
parentb1e40a6f9198534d5d4545ff4706779cb9dae8c8 (diff)
downloadgdb-d832cb68fbbd28120e6311f77e9564d91bc18bee.zip
gdb-d832cb68fbbd28120e6311f77e9564d91bc18bee.tar.gz
gdb-d832cb68fbbd28120e6311f77e9564d91bc18bee.tar.bz2
* breakpoint.c (bpstat_stop_status): Clear breakpoint_at for
all hardware bpstats.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r--gdb/breakpoint.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 9454428..6e863d7 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;
}