Use fuword32() to fetch instructions, this will work on both 32 and 64 bit
compilation.
This commit is contained in:
parent
e285f763bd
commit
dcd2709851
@ -820,7 +820,7 @@ trap(struct trapframe *trapframe)
|
|||||||
va += sizeof(int);
|
va += sizeof(int);
|
||||||
|
|
||||||
/* read break instruction */
|
/* read break instruction */
|
||||||
instr = fuword((caddr_t)va);
|
instr = fuword32((caddr_t)va);
|
||||||
#if 0
|
#if 0
|
||||||
printf("trap: %s (%d) breakpoint %x at %x: (adr %x ins %x)\n",
|
printf("trap: %s (%d) breakpoint %x at %x: (adr %x ins %x)\n",
|
||||||
p->p_comm, p->p_pid, instr, trapframe->pc,
|
p->p_comm, p->p_pid, instr, trapframe->pc,
|
||||||
@ -869,7 +869,7 @@ trap(struct trapframe *trapframe)
|
|||||||
if (DELAYBRANCH(trapframe->cause))
|
if (DELAYBRANCH(trapframe->cause))
|
||||||
va += sizeof(int);
|
va += sizeof(int);
|
||||||
/* read break instruction */
|
/* read break instruction */
|
||||||
instr = fuword((caddr_t)va);
|
instr = fuword32((caddr_t)va);
|
||||||
|
|
||||||
if (DELAYBRANCH(trapframe->cause)) { /* Check BD bit */
|
if (DELAYBRANCH(trapframe->cause)) { /* Check BD bit */
|
||||||
locr0->pc = MipsEmulateBranch(locr0, trapframe->pc, 0,
|
locr0->pc = MipsEmulateBranch(locr0, trapframe->pc, 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user