avoid some more compiler warnings, and fix a couple of errors.

This commit is contained in:
mrg 2000-04-06 13:32:49 +00:00
parent a302716de4
commit 966add799c
3 changed files with 24 additions and 25 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_interface.c,v 1.28 2000/03/16 02:36:58 eeh Exp $ */
/* $NetBSD: db_interface.c,v 1.29 2000/04/06 13:32:49 mrg Exp $ */
/*
* Mach Operating System
@ -168,7 +168,7 @@ kdb_trap(type, tf)
register struct trapframe64 *tf;
{
int s, tl;
struct trapstate *ts = &ddb_regs.ddb_ts;
struct trapstate *ts = &ddb_regs.ddb_ts[0];
extern int savetstate(struct trapstate *ts);
extern void restoretstate(int tl, struct trapstate *ts);
extern int trap_trace_dis;
@ -393,11 +393,11 @@ struct pmap* pm;
j++;
data1 = ldxa((vaddr_t)&ptbl[j], ASI_PHYS_CACHED);
if (data0 || data1) {
db_printf("%p: %lx\t",
(i<<STSHIFT)|(k<<PDSHIFT)|((j-1)<<PTSHIFT),
db_printf("%llx: %llx\t",
((u_int64_t)i<<STSHIFT)|(k<<PDSHIFT)|((j-1)<<PTSHIFT),
(u_long)(data0));
db_printf("%p: %lx\n",
(i<<STSHIFT)|(k<<PDSHIFT)|(j<<PTSHIFT),
db_printf("%llx: %llx\n",
((u_int64_t)i<<STSHIFT)|(k<<PDSHIFT)|(j<<PTSHIFT),
(u_long)(data1));
}
}
@ -847,7 +847,6 @@ db_uvmhistdump(addr, have_addr, count, modif)
db_expr_t count;
char *modif;
{
int full = 0;
extern void uvmhist_dump __P((struct uvm_history *));
extern struct uvm_history_head uvm_histories;

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_trace.c,v 1.11 2000/03/16 02:36:58 eeh Exp $ */
/* $NetBSD: db_trace.c,v 1.12 2000/04/06 13:32:49 mrg Exp $ */
/*
* Mach Operating System
@ -149,8 +149,8 @@ db_dump_window(addr, have_addr, count, modif)
/* Traverse window stack */
for (i=0; i<addr && frame; i++) {
if (frame & 1)
frame = (u_int64_t)((struct frame64 *)(frame + BIAS))->fr_fp;
else frame = (u_int64_t)((struct frame32 *)frame)->fr_fp;
frame = (u_int64_t)((struct frame64 *)(u_long)(frame + BIAS))->fr_fp;
else frame = (u_int64_t)((struct frame32 *)(u_long)frame)->fr_fp;
}
db_printf("Window %x ", addr);
@ -162,7 +162,7 @@ db_print_window(frame)
u_int64_t frame;
{
if (frame & 1) {
struct frame64* f = (struct frame64*)(frame + BIAS);
struct frame64* f = (struct frame64*)(u_long)(frame + BIAS);
db_printf("frame64 %x locals, ins:\n", f);
if (INKERNEL(f)) {
@ -195,7 +195,7 @@ u_int64_t frame;
db_printf("\n");
}
} else {
struct frame32* f = (struct frame32*)frame;
struct frame32* f = (struct frame32*)(u_long)frame;
db_printf("frame %x locals, ins:\n", f);
if (INKERNEL(f)) {
@ -262,25 +262,25 @@ db_dump_stack(addr, have_addr, count, modif)
oldframe = frame;
if (frame & 1) {
frame += BIAS;
if (!INKERNEL(((struct frame64 *)(frame)))
if (!INKERNEL(((struct frame64 *)(u_long)(frame)))
&& kernel_only) break;
db_printf("Window %x ", i);
db_print_window(frame - BIAS);
if (!INKERNEL(((struct frame64 *)(frame))))
copyin(((caddr_t)&((struct frame64 *)frame)->fr_fp), &frame, sizeof(frame));
if (!INKERNEL(((struct frame64 *)(u_long)(frame))))
copyin(((caddr_t)&((struct frame64 *)(u_long)frame)->fr_fp), &frame, sizeof(frame));
else
frame = ((struct frame64 *)frame)->fr_fp;
frame = ((struct frame64 *)(u_long)frame)->fr_fp;
} else {
u_int32_t tmp;
if (!INKERNEL(((struct frame32 *)frame))
if (!INKERNEL(((struct frame32 *)(u_long)frame))
&& kernel_only) break;
db_printf("Window %x ", i);
db_print_window(frame);
if (!INKERNEL(((struct frame32 *)frame))) {
copyin(&((struct frame32 *)frame)->fr_fp, &tmp, sizeof(tmp));
if (!INKERNEL(((struct frame32 *)(u_long)frame))) {
copyin(&((struct frame32 *)(u_long)frame)->fr_fp, &tmp, sizeof(tmp));
frame = (u_int64_t)tmp;
} else
frame = (u_int64_t)((struct frame32 *)frame)->fr_fp;
frame = (u_int64_t)((struct frame32 *)(u_long)frame)->fr_fp;
}
}
@ -363,7 +363,7 @@ db_dump_ts(addr, have_addr, count, modif)
int i, tl;
/* Use our last trapframe? */
ts = &ddb_regs.ddb_ts;
ts = &ddb_regs.ddb_ts[0];
tl = ddb_regs.ddb_tl;
for (i=0; i<tl; i++) {
printf("%d tt=%lx tstate=%lx tpc=%p tnpc=%p\n",

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.35 2000/01/10 03:53:22 eeh Exp $ */
/* $NetBSD: trap.c,v 1.36 2000/04/06 13:32:49 mrg Exp $ */
/*
* Copyright (c) 1996
@ -1187,7 +1187,7 @@ kfault:
}
if (trapdebug&(TDB_ADDFLT|TDB_FOLLOW)) {
extern void* return_from_trap __P((void));
if ((void*)tf->tf_pc == (void*)return_from_trap) {
if ((void *)(u_long)tf->tf_pc == (void *)return_from_trap) {
printf("Returning from stack datafault\n");
}
}
@ -1868,7 +1868,7 @@ syscall(code, tf, pc)
}
#ifdef DEBUG
/* printf("code=%x, nsys=%x\n", code, nsys);*/
/* printf("code=%x, nsys=%x\n", code, nsys); */
if (trapdebug&(TDB_SYSCALL|TDB_FOLLOW))
printf("%d syscall(%d[%x]): tstate=%x:%x %s\n", curproc?curproc->p_pid:-1, code, code,
(int)(tf->tf_tstate>>32), (int)(tf->tf_tstate),
@ -1963,7 +1963,7 @@ syscall(code, tf, pc)
if (trapdebug&(TDB_SYSCALL|TDB_FOLLOW)) {
int k;
printf("Copyin args of %d from %p:\n", j,
(caddr_t)(tf->tf_out[6] + offsetof(struct frame32, fr_argx)));
(caddr_t)(u_long)(tf->tf_out[6] + offsetof(struct frame32, fr_argx)));
for (k=0; k<j; k++)
printf("arg %d = %p at %d val %p\n", k, (long)temp[k], nap+k, (long)args.i[nap+k]);
}