Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64/sparc64 Cleanup types in DEBUG printf()s.
details: https://anonhg.NetBSD.org/src/rev/dea33cb9a8db
branches: trunk
changeset: 500357:dea33cb9a8db
user: eeh <eeh%NetBSD.org@localhost>
date: Sun Dec 10 19:52:17 2000 +0000
description:
Cleanup types in DEBUG printf()s.
diffstat:
sys/arch/sparc64/sparc64/trap.c | 50 +++++++++++++---------------------------
1 files changed, 16 insertions(+), 34 deletions(-)
diffs (135 lines):
diff -r 8f817c3b59cb -r dea33cb9a8db sys/arch/sparc64/sparc64/trap.c
--- a/sys/arch/sparc64/sparc64/trap.c Sun Dec 10 19:41:35 2000 +0000
+++ b/sys/arch/sparc64/sparc64/trap.c Sun Dec 10 19:52:17 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.58 2000/12/07 01:05:55 eeh Exp $ */
+/* $NetBSD: trap.c,v 1.59 2000/12/10 19:52:17 eeh Exp $ */
/*
* Copyright (c) 1996
@@ -49,7 +49,6 @@
*/
#define NEW_FPSTATE
-#define TRAPWIN
#include "opt_ddb.h"
#include "opt_syscall_debug.h"
@@ -883,9 +882,6 @@
register struct rwindow64 *rw = &pcb->pcb_rw[0];
register u_int64_t rwdest;
register int i, j;
-#ifndef TRAPWIN
- register struct trapframe64 *tf = p->p_md.md_tf;
-#endif
i = pcb->pcb_nsaved;
#ifdef DEBUG
@@ -902,17 +898,13 @@
rwdest = rw[i--].rw_in[6];
#ifdef DEBUG
if (rwindow_debug&RW_FOLLOW)
- printf("window %d at %lx\n", i, rwdest);
+ printf("window %d at %lx\n", i, (long)rwdest);
#endif
if (rwdest & 1) {
-#ifndef TRAPWIN
- struct rwindow64 *rwstack;
- /* 64-bit window */
-#endif
#ifdef DEBUG
if (rwindow_debug&RW_64) {
printf("rwindow_save: 64-bit tf to %p+BIAS or %p\n",
- (void *)rwdest, (void *)(rwdest+BIAS));
+ (void *)(long)rwdest, (void *)(long)(rwdest+BIAS));
Debugger();
}
#endif
@@ -921,32 +913,19 @@
sizeof(*rw))) {
#ifdef DEBUG
if (rwindow_debug&(RW_ERR|RW_64))
- printf("rwindow_save: 64-bit pcb copyout to %p failed\n", (void *)rwdest);
+ printf("rwindow_save: 64-bit pcb copyout to %p failed\n",
+ (void *)(long)rwdest);
#endif
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,
+ (caddr_t)&rw[i], (caddr_t)(long)rwdest,
sizeof(*rw));
Debugger();
}
#endif
-#ifndef TRAPWIN
- rwstack = (struct rwindow64 *)rwdest;
- for (j=0; j<8; j++) {
- if (copyout((void *)(&rwstack->rw_local[j]), &tf->tf_local[j],
- sizeof (tf->tf_local[j]))) {
-#ifdef DEBUG
- if (rwindow_debug&(RW_64|RW_ERR))
- printf("rwindow_save: 64-bit tf suword to %p failed\n",
- &rwstack->rw_local[j]);
-#endif
- return (-1);
- }
- }
-#endif
} else {
struct rwindow32 rwstack;
@@ -958,7 +937,8 @@
if (copyout(&rwstack, (caddr_t)(u_long)rwdest, sizeof(rwstack))) {
#ifdef DEBUG
if (rwindow_debug&RW_ERR)
- printf("rwindow_save: 32-bit pcb copyout to %p failed\n", (void *)rwdest);
+ printf("rwindow_save: 32-bit pcb copyout to %p failed\n",
+ (void *)(long)rwdest);
#endif
return (-1);
}
@@ -1010,7 +990,8 @@
#ifdef DEBUG
if (tf->tf_pc == tf->tf_npc) {
- printf("data_access_fault: tpc %lx == tnpc %lx\n", tf->tf_pc, tf->tf_npc);
+ printf("data_access_fault: tpc %lx == tnpc %lx\n",
+ (long)tf->tf_pc, (long)tf->tf_npc);
Debugger();
}
if (protmmu || missmmu) {
@@ -1022,9 +1003,9 @@
Debugger();
}
write_user_windows();
-/* if (cpcb->pcb_nsaved > 6) trapdebug |= TDB_NSAVED; */
- if ((trapdebug&TDB_NSAVED && cpcb->pcb_nsaved) ||
- trapdebug&(TDB_ADDFLT|TDB_FOLLOW)) {
+ if ((cpcb->pcb_nsaved > 8) ||
+ (trapdebug&TDB_NSAVED && cpcb->pcb_nsaved) ||
+ (trapdebug&(TDB_ADDFLT|TDB_FOLLOW))) {
printf("%ld: data_access_fault(%lx, %p, %p, %p) nsaved=%d\n",
(long)(curproc?curproc->p_pid:-1), (long)type, (void*)addr,
(void*)pc, (void*)tf, (int)cpcb->pcb_nsaved);
@@ -1234,7 +1215,8 @@
#ifdef DEBUG
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",
+ (long)tf->tf_pc, (long)tf->tf_npc);
Debugger();
}
if (protmmu || missmmu) {
@@ -2124,7 +2106,7 @@
if (trapdebug&(TDB_SYSCALL|TDB_FOLLOW))
printf("syscall: return tstate=%llx fail %d to %p\n",
(unsigned long long)tf->tf_tstate, error,
- (void *)(unsigned long long)dest);
+ (void *)(long)dest);
#endif
break;
}
Home |
Main Index |
Thread Index |
Old Index