Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/amd64/amd64 -don't refer to oosyscall() unless COMP...
details: https://anonhg.NetBSD.org/src/rev/72660604f26c
branches: trunk
changeset: 559777:72660604f26c
user: drochner <drochner%NetBSD.org@localhost>
date: Tue Mar 23 19:09:01 2004 +0000
description:
-don't refer to oosyscall() unless COMPAT_10 or COMPAT_IBCS2 is defined
-improve diagnostic message on bus errors in the TRAP_SIGDEBUG case
diffstat:
sys/arch/amd64/amd64/trap.c | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
diffs (64 lines):
diff -r e52832049a2e -r 72660604f26c sys/arch/amd64/amd64/trap.c
--- a/sys/arch/amd64/amd64/trap.c Tue Mar 23 19:07:40 2004 +0000
+++ b/sys/arch/amd64/amd64/trap.c Tue Mar 23 19:09:01 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.17 2004/03/14 01:08:47 cl Exp $ */
+/* $NetBSD: trap.c,v 1.18 2004/03/23 19:09:01 drochner Exp $ */
/*-
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -75,12 +75,14 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.17 2004/03/14 01:08:47 cl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.18 2004/03/23 19:09:01 drochner Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
#include "opt_lockdebug.h"
#include "opt_multiprocessor.h"
+#include "opt_compat_netbsd.h"
+#include "opt_compat_ibcs2.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -174,7 +176,10 @@
int type = (int)frame->tf_trapno;
struct pcb *pcb;
extern char fusuintrfailure[],
- resume_iret[], IDTVEC(oosyscall)[];
+ resume_iret[];
+#if defined(COMPAT_10) || defined(COMPAT_IBCS2)
+ extern char IDTVEC(oosyscall)[];
+#endif
#if 0
extern char resume_pop_ds[], resume_pop_es[];
#endif
@@ -312,8 +317,8 @@
case T_ALIGNFLT|T_USER:
case T_NMI|T_USER:
#ifdef TRAP_SIGDEBUG
- printf("pid %d (%s): BUS at rip %lx addr %lx\n",
- p->p_pid, p->p_comm, frame->tf_rip, rcr2());
+ printf("pid %d (%s): BUS (%x) at rip %lx addr %lx\n",
+ p->p_pid, p->p_comm, type, frame->tf_rip, rcr2());
frame_dump(frame);
#endif
KSI_INIT_TRAP(&ksi);
@@ -550,6 +555,7 @@
}
case T_TRCTRAP:
+#if defined(COMPAT_10) || defined(COMPAT_IBCS2)
/* Check whether they single-stepped into a lcall. */
if (frame->tf_rip == (int)IDTVEC(oosyscall))
return;
@@ -557,6 +563,7 @@
frame->tf_rflags &= ~PSL_T;
return;
}
+#endif
goto we_re_toast;
case T_BPTFLT|T_USER: /* bpt instruction fault */
Home |
Main Index |
Thread Index |
Old Index