Module Name: src Committed By: martin Date: Mon Apr 23 15:09:13 UTC 2012
Modified Files: src/sys/arch/sparc64/sparc64: trap.c Log Message: Report faulting data address with SIGBUS (instead of the faulting instruction) To generate a diff of this commit: cvs rdiff -u -r1.174 -r1.175 src/sys/arch/sparc64/sparc64/trap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/sparc64/sparc64/trap.c diff -u src/sys/arch/sparc64/sparc64/trap.c:1.174 src/sys/arch/sparc64/sparc64/trap.c:1.175 --- src/sys/arch/sparc64/sparc64/trap.c:1.174 Sun Mar 25 15:40:32 2012 +++ src/sys/arch/sparc64/sparc64/trap.c Mon Apr 23 15:09:13 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.174 2012/03/25 15:40:32 nakayama Exp $ */ +/* $NetBSD: trap.c,v 1.175 2012/04/23 15:09:13 martin Exp $ */ /* * Copyright (c) 1996-2002 Eduardo Horvath. All rights reserved. @@ -50,7 +50,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.174 2012/03/25 15:40:32 nakayama Exp $"); +__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.175 2012/04/23 15:09:13 martin Exp $"); #include "opt_ddb.h" #include "opt_multiprocessor.h" @@ -730,7 +730,6 @@ badtrap: l->l_proc->p_pid, l->l_lid, l->l_proc->p_comm, fmt64(dsfsr), fmt64(dsfar), fmt64(isfsr), pc); #endif - } #if defined(DDB) && defined(DEBUG) if (trapdebug & TDB_STOPSIG) { @@ -747,7 +746,8 @@ badtrap: sig = SIGBUS; ksi.ksi_trap = type; ksi.ksi_code = BUS_ADRALN; - ksi.ksi_addr = (void *)pc; + ksi.ksi_addr = (void*)dsfar; + } break; case T_FP_IEEE_754: @@ -1560,7 +1560,7 @@ text_access_error(struct trapframe64 *tf ksi.ksi_signo = SIGBUS; ksi.ksi_code = BUS_OBJERR; ksi.ksi_trap = type; - ksi.ksi_addr = (void *)pc; + ksi.ksi_addr = (void *)afva; trapsignal(l, &ksi); }