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);
        }
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to