When setting watchpoints, call pmap_update() for each watchpoint, rather

than at the end, since they may be in different pmaps.  This avoids a null
pointer dereference that was causing panics when resuming from DDB on arm26.
This commit is contained in:
bjh21 2001-10-13 15:17:38 +00:00
parent 8bf90d96b4
commit cabab13edd
1 changed files with 4 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_watch.c,v 1.16 2001/09/10 21:19:42 chris Exp $ */
/* $NetBSD: db_watch.c,v 1.17 2001/10/13 15:17:38 bjh21 Exp $ */
/*
* Mach Operating System
@ -221,15 +221,16 @@ db_set_watchpoints()
if (!db_watchpoints_inserted) {
for (watch = db_watchpoint_list;
watch != 0;
watch = watch->link)
watch = watch->link) {
pmap_protect(watch->map->pmap,
trunc_page(watch->loaddr),
round_page(watch->hiaddr),
VM_PROT_READ);
pmap_update(watch->map->pmap);
}
db_watchpoints_inserted = TRUE;
}
pmap_update(watch->map->pmap);
}
void