]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix gdb issue where the i-cache was not being updated when a breakpoint
authorgrehan <grehan@FreeBSD.org>
Tue, 5 Dec 2006 04:01:52 +0000 (04:01 +0000)
committergrehan <grehan@FreeBSD.org>
Tue, 5 Dec 2006 04:01:52 +0000 (04:01 +0000)
commit8d87f5baaa75c2a2b7056fbb972938279cee88f7
tree3403144535091ef5fcdb4c1243c91d984e07d700
parent4fdcb8965edb8a590b44f829b781bf01588c1b1e
Fix gdb issue where the i-cache was not being updated when a breakpoint
was written into a user's address space. The fix is to modify uiomove_fromphys
to sync the icache when an executable user-space page is written into.

Alan Cox suggested that there should probably be a higher-level interface
to this in the ptrace code, but agreed that this is an OK short-term solution.

Files changed:

pmap.h - declaration of pmap_page_executable()
pmap_dispatch.c - pass through the page_executable call to the mmu object
mmu_oea.c - implement the page_executable method by examining the PTE_EXEC
 field in the vm_page_t
uio_machdep.c - in uiomove_fromphys(), if the op was a UIO_WRITE to user-space,
 and if the page is executable, sync the icache since this is at the least
 a breakpoint-write from gdb.

Reported by: marcel
Tested by: marcel, grehan on g3+g4
Discussed with: alc
MFC after: 2 weeks
sys/powerpc/aim/mmu_oea.c
sys/powerpc/aim/uio_machdep.c
sys/powerpc/include/pmap.h
sys/powerpc/powerpc/mmu_if.m
sys/powerpc/powerpc/mmu_oea.c
sys/powerpc/powerpc/pmap_dispatch.c
sys/powerpc/powerpc/uio_machdep.c