From 0ec56bf8049735145acf2893fe9155bbabc785ac Mon Sep 17 00:00:00 2001 From: christos Date: Mon, 14 Jan 2013 00:06:11 +0000 Subject: [PATCH] print the lid too. --- sys/arch/amd64/amd64/trap.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/sys/arch/amd64/amd64/trap.c b/sys/arch/amd64/amd64/trap.c index 6c91232375f6..958de57f3e56 100644 --- a/sys/arch/amd64/amd64/trap.c +++ b/sys/arch/amd64/amd64/trap.c @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.74 2012/08/28 15:54:40 christos Exp $ */ +/* $NetBSD: trap.c,v 1.75 2013/01/14 00:06:11 christos Exp $ */ /*- * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.74 2012/08/28 15:54:40 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.75 2013/01/14 00:06:11 christos Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -199,7 +199,7 @@ trap_print(const struct trapframe *frame, const lwp_t *l) type, frame->tf_err, (u_long)frame->tf_rip, frame->tf_cs, frame->tf_rflags, rcr2(), curcpu()->ci_ilevel, frame->tf_rsp); - printf("curlwp %p pid %d lid %d lowest kstack %p\n", + printf("curlwp %p pid %d.%d lowest kstack %p\n", l, l->l_proc->p_pid, l->l_lid, KSTACK_LOWEST_ADDR(l)); } @@ -390,8 +390,8 @@ kernelfault: case T_STKFLT|T_USER: case T_ALIGNFLT|T_USER: #ifdef TRAP_SIGDEBUG - printf("pid %d (%s): BUS/SEGV (%x) at rip %lx addr %lx\n", - p->p_pid, p->p_comm, type, frame->tf_rip, rcr2()); + printf("pid %d.%d (%s): BUS/SEGV (%x) at rip %lx addr %lx\n", + p->p_pid, l->l_lid, p->p_comm, type, frame->tf_rip, rcr2()); frame_dump(frame); #endif KSI_INIT_TRAP(&ksi); @@ -424,8 +424,8 @@ kernelfault: case T_PRIVINFLT|T_USER: /* privileged instruction fault */ case T_FPOPFLT|T_USER: /* coprocessor operand fault */ #ifdef TRAP_SIGDEBUG - printf("pid %d (%s): ILL at rip %lx addr %lx\n", - p->p_pid, p->p_comm, frame->tf_rip, rcr2()); + printf("pid %d.%d (%s): ILL at rip %lx addr %lx\n", + p->p_pid, l->l_lid, p->p_comm, frame->tf_rip, rcr2()); frame_dump(frame); #endif KSI_INIT_TRAP(&ksi); @@ -463,8 +463,8 @@ kernelfault: #if 0 /* handled by fpudna() */ case T_DNA|T_USER: { - printf("pid %d killed due to lack of floating point\n", - p->p_pid); + printf("pid %d.%d killed due to lack of floating point\n", + p->p_pid, l->l_lid); KSI_INIT_TRAP(&ksi); ksi.ksi_signo = SIGKILL; ksi.ksi_trap = type & ~T_USER; @@ -639,14 +639,14 @@ faultcommon: } if (error == ENOMEM) { ksi.ksi_signo = SIGKILL; - printf("UVM: pid %d (%s), uid %d killed: out of swap\n", - p->p_pid, p->p_comm, + printf("UVM: pid %d.%d (%s), uid %d killed: out of swap\n", + p->p_pid, l->l_lid, p->p_comm, l->l_cred ? kauth_cred_geteuid(l->l_cred) : -1); } else { #ifdef TRAP_SIGDEBUG - printf("pid %d (%s): SEGV at rip %lx addr %lx\n", - p->p_pid, p->p_comm, frame->tf_rip, va); + printf("pid %d.%d (%s): SEGV at rip %lx addr %lx\n", + p->p_pid, l->l_lid, p->p_comm, frame->tf_rip, va); frame_dump(frame); #endif ksi.ksi_signo = SIGSEGV;