From 24dd643d54208a4ab5acfbee60b478bd85b21da4 Mon Sep 17 00:00:00 2001 From: Justin Hibbits Date: Mon, 22 Oct 2018 00:27:37 +0000 Subject: [PATCH] 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. --- sys/powerpc/powerpc/trap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/powerpc/powerpc/trap.c b/sys/powerpc/powerpc/trap.c index cdb644f7a75..bf5b492ea29 100644 --- a/sys/powerpc/powerpc/trap.c +++ b/sys/powerpc/powerpc/trap.c @@ -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); }