diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-12-30 08:37:42 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-12-30 08:37:42 +0000 |
commit | daafa1db7630c5204dbc2cade78b8f37208c5f86 (patch) | |
tree | d7307b0418d477d8b2ecdd05dfb717defe8167aa | |
parent | 46b4aa34eb64240c033a41ddc3035c0d1a57e83c (diff) |
from netbsd:
Change MachEmulateBranch() to be able to read an insn from user space.
Kernel-debugger breakpoints in user space, or FP insns that cause
underflow in a delay slot, should now work properly. Single-stepping
of arbitrary user processes, from user level, should be added.
-rw-r--r-- | sys/arch/pmax/pmax/trap.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/arch/pmax/pmax/trap.c b/sys/arch/pmax/pmax/trap.c index 828e1ce6455..d4b3cf1a3ec 100644 --- a/sys/arch/pmax/pmax/trap.c +++ b/sys/arch/pmax/pmax/trap.c @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.23 1995/09/11 22:03:00 jonathan Exp $ */ +/* $NetBSD: trap.c,v 1.24 1995/12/28 16:22:41 jonathan Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -1605,7 +1605,10 @@ MachEmulateBranch(regsPtr, instPC, fpcCSR, allowNonBranch) InstFmt inst; unsigned retAddr; int condition; - inst = *(InstFmt *)instPC; + + inst.word = (instPC < MACH_CACHED_MEMORY_ADDR) ? + fuiword((caddr_t)instPC) : *(unsigned*)instPC; + #if 0 printf("regsPtr=%x PC=%x Inst=%x fpcCsr=%x\n", regsPtr, instPC, inst.word, fpcCSR); /* XXX */ |