Fix a bug in rwindow_save() that always wrote out window 0 in 64-bit
code and caused problems with ksh.
This commit is contained in:
parent
297dba1163
commit
873101cd21
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: trap.c,v 1.57 2000/12/06 01:47:51 mrg Exp $ */
|
/* $NetBSD: trap.c,v 1.58 2000/12/07 01:05:55 eeh Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1996
|
* Copyright (c) 1996
|
||||||
@ -917,7 +917,7 @@ rwindow_save(p)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
rwdest += BIAS;
|
rwdest += BIAS;
|
||||||
if (copyout((caddr_t)rw, (caddr_t)(u_long)rwdest,
|
if (copyout((caddr_t)&rw[i], (caddr_t)(u_long)rwdest,
|
||||||
sizeof(*rw))) {
|
sizeof(*rw))) {
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (rwindow_debug&(RW_ERR|RW_64))
|
if (rwindow_debug&(RW_ERR|RW_64))
|
||||||
@ -925,6 +925,14 @@ rwindow_save(p)
|
|||||||
#endif
|
#endif
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
|
#ifdef DEBUG
|
||||||
|
if (rwindow_debug&RW_64) {
|
||||||
|
printf("Finished copyout(%p, %p, %lx)\n",
|
||||||
|
(caddr_t)&rw[i], (caddr_t)(u_long)rwdest,
|
||||||
|
sizeof(*rw));
|
||||||
|
Debugger();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#ifndef TRAPWIN
|
#ifndef TRAPWIN
|
||||||
rwstack = (struct rwindow64 *)rwdest;
|
rwstack = (struct rwindow64 *)rwdest;
|
||||||
for (j=0; j<8; j++) {
|
for (j=0; j<8; j++) {
|
||||||
@ -955,7 +963,6 @@ rwindow_save(p)
|
|||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* rw++; */
|
|
||||||
}
|
}
|
||||||
pcb->pcb_nsaved = 0;
|
pcb->pcb_nsaved = 0;
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
@ -996,7 +1003,7 @@ data_access_fault(type, addr, pc, tf)
|
|||||||
vm_prot_t access_type;
|
vm_prot_t access_type;
|
||||||
vaddr_t onfault;
|
vaddr_t onfault;
|
||||||
u_quad_t sticks;
|
u_quad_t sticks;
|
||||||
#if DEBUG
|
#ifdef DEBUG
|
||||||
static int lastdouble;
|
static int lastdouble;
|
||||||
extern struct pcb* cpcb;
|
extern struct pcb* cpcb;
|
||||||
#endif
|
#endif
|
||||||
@ -1225,7 +1232,7 @@ data_access_error(type, sfva, sfsr, afva, afsr, tf)
|
|||||||
static int lastdouble;
|
static int lastdouble;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if DEBUG
|
#ifdef DEBUG
|
||||||
if (tf->tf_pc == tf->tf_npc) {
|
if (tf->tf_pc == tf->tf_npc) {
|
||||||
printf("data_access_error: tpc %lx == tnpc %lx\n", tf->tf_pc, tf->tf_npc);
|
printf("data_access_error: tpc %lx == tnpc %lx\n", tf->tf_pc, tf->tf_npc);
|
||||||
Debugger();
|
Debugger();
|
||||||
@ -1474,7 +1481,7 @@ text_access_fault(type, pc, tf)
|
|||||||
vm_prot_t access_type;
|
vm_prot_t access_type;
|
||||||
u_quad_t sticks;
|
u_quad_t sticks;
|
||||||
|
|
||||||
#if DEBUG
|
#ifdef DEBUG
|
||||||
if (tf->tf_pc == tf->tf_npc) {
|
if (tf->tf_pc == tf->tf_npc) {
|
||||||
printf("text_access_fault: tpc %p == tnpc %p\n", (void *)(u_long)tf->tf_pc, (void *)(u_long)tf->tf_npc);
|
printf("text_access_fault: tpc %p == tnpc %p\n", (void *)(u_long)tf->tf_pc, (void *)(u_long)tf->tf_npc);
|
||||||
Debugger();
|
Debugger();
|
||||||
@ -1608,12 +1615,12 @@ text_access_error(type, pc, sfsr, afva, afsr, tf)
|
|||||||
register int rv;
|
register int rv;
|
||||||
vm_prot_t access_type;
|
vm_prot_t access_type;
|
||||||
u_quad_t sticks;
|
u_quad_t sticks;
|
||||||
#if DEBUG
|
#ifdef DEBUG
|
||||||
static int lastdouble;
|
static int lastdouble;
|
||||||
#endif
|
#endif
|
||||||
char buf[768];
|
char buf[768];
|
||||||
|
|
||||||
#if DEBUG
|
#ifdef DEBUG
|
||||||
if (tf->tf_pc == tf->tf_npc) {
|
if (tf->tf_pc == tf->tf_npc) {
|
||||||
printf("text_access_error: tpc %p == tnpc %p\n",
|
printf("text_access_error: tpc %p == tnpc %p\n",
|
||||||
(void *)(u_long)tf->tf_pc, (void *)(u_long)tf->tf_npc);
|
(void *)(u_long)tf->tf_pc, (void *)(u_long)tf->tf_npc);
|
||||||
|
Loading…
Reference in New Issue
Block a user