Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Oct 2018 00:27:37 +0000 (UTC)
From:      Justin Hibbits <jhibbits@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r339560 - head/sys/powerpc/powerpc
Message-ID:  <201810220027.w9M0RbXD077323@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhibbits
Date: Mon Oct 22 00:27:37 2018
New Revision: 339560
URL: https://svnweb.freebsd.org/changeset/base/339560

Log:
  powerpc: stash off srr0 in si_addr for signals
  
  si_addr is the address of the instruction executing at the time the
  signal was sent.  Populate this field with srr0, which, though not
  always the case, is most often the instruction that triggered the fault.

Modified:
  head/sys/powerpc/powerpc/trap.c

Modified: head/sys/powerpc/powerpc/trap.c
==============================================================================
--- head/sys/powerpc/powerpc/trap.c	Mon Oct 22 00:21:27 2018	(r339559)
+++ head/sys/powerpc/powerpc/trap.c	Mon Oct 22 00:27:37 2018	(r339560)
@@ -438,7 +438,7 @@ trap(struct trapframe *frame)
 		ksiginfo_init_trap(&ksi);
 		ksi.ksi_signo = sig;
 		ksi.ksi_code = (int) ucode; /* XXX, not POSIX */
-		/* ksi.ksi_addr = ? */
+		ksi.ksi_addr = (void *)frame->srr0;
 		ksi.ksi_trapno = type;
 		trapsignal(td, &ksi);
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810220027.w9M0RbXD077323>