vkernel64 - Ignore spurious trap during fast system call, enable some debugging
authorMatthew Dillon <dillon@apollo.backplane.com>
Tue, 23 Mar 2010 21:00:04 +0000 (14:00 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Tue, 23 Mar 2010 21:00:04 +0000 (14:00 -0700)
sys/platform/vkernel64/x86_64/exception.c
sys/platform/vkernel64/x86_64/trap.c

index edb0306..28afac2 100644 (file)
@@ -181,12 +181,15 @@ exc_segfault(int signo, siginfo_t *info, void *ctxp)
 {
        ucontext_t *ctx = ctxp;
 
-#if 0
-       kprintf("CAUGHT SEGFAULT EIP %08x ERR %08x TRAPNO %d err %d\n",
-               ctx->uc_mcontext.mc_eip,
+#if 1
+       kprintf("CAUGHT SIG %d RIP %08lx ERR %08lx TRAPNO %ld "
+               "err %ld addr %08lx\n",
+               signo,
+               ctx->uc_mcontext.mc_rip,
                ctx->uc_mcontext.mc_err,
                ctx->uc_mcontext.mc_trapno & 0xFFFF,
-               ctx->uc_mcontext.mc_trapno >> 16);
+               ctx->uc_mcontext.mc_trapno >> 16,
+               ctx->uc_mcontext.mc_addr);
 #endif
        kern_trap((struct trapframe *)&ctx->uc_mcontext.mc_rdi);
        splz();
index 628033e..431daa5 100644 (file)
@@ -793,7 +793,8 @@ kernel_trap:
                MAKEMPSAFE(have_mplock);
                trap_fatal(frame, FALSE, eva);
                goto out2;
-       case T_SYSCALL80:       /* JG T_FAST_SYSCALL? */
+       case T_SYSCALL80:
+       case T_FAST_SYSCALL:
                /*
                 * Ignore this trap generated from a spurious SIGTRAP.
                 *