summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorGerhard Roth <gerhard@cvs.openbsd.org>2015-12-18 08:15:10 +0000
committerGerhard Roth <gerhard@cvs.openbsd.org>2015-12-18 08:15:10 +0000
commit7416aa2f581b235784ec8f22b5a424a95ea08456 (patch)
tree2a030341855dd0151d2bdc9e2f539ea127c24e9b /sys/arch/i386
parent0493ce1dd529058c7d1659fb14415373dc9739aa (diff)
Prevent uvm_fault() when hitting a breakpoint by restoring the original
page protection bits. Go ahead, mlarkin@
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/i386/db_memrw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/i386/i386/db_memrw.c b/sys/arch/i386/i386/db_memrw.c
index 3434e7b410f..cc28763301f 100644
--- a/sys/arch/i386/i386/db_memrw.c
+++ b/sys/arch/i386/i386/db_memrw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_memrw.c,v 1.15 2015/04/12 18:37:53 mlarkin Exp $ */
+/* $OpenBSD: db_memrw.c,v 1.16 2015/12/18 08:15:09 gerhard Exp $ */
/* $NetBSD: db_memrw.c,v 1.6 1999/04/12 20:38:19 pk Exp $ */
/*
@@ -129,7 +129,7 @@ db_write_text(vaddr_t addr, size_t size, char *data)
* Restore the old PTE.
*/
pmap_update_pg(pgva);
- pmap_pte_setbits(addr, 0, bits);
+ pmap_pte_setbits(addr, bits, PG_RW);
} while (size != 0);
}