From: Ian Lance Taylor Date: Fri, 21 Jul 2017 18:08:01 +0000 (+0000) Subject: runtime: handle PPC/PPC64 GNU/Linux in getSiginfo X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0ab71760942f9ca14b9b7530455f390271db3106;p=gcc.git runtime: handle PPC/PPC64 GNU/Linux in getSiginfo Updates golang/go#20931 Reviewed-on: https://go-review.googlesource.com/50631 From-SVN: r250436 --- diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 364312f2202..accb55f768e 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -e34cb8dee6c1f215329e0eea79202b48cb83817c +a9f1aeced86691de891fbf2a8c97e848faf1962e The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/libgo/runtime/go-signal.c b/libgo/runtime/go-signal.c index ad29662d0fd..d274865074f 100644 --- a/libgo/runtime/go-signal.c +++ b/libgo/runtime/go-signal.c @@ -215,6 +215,11 @@ getSiginfo(siginfo_t *info, void *context __attribute__((unused))) ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.gregs[REG_EIP]; #endif #endif +#ifdef __PPC__ + #ifdef __linux__ + ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.regs->nip; + #endif +#endif if (ret.sigpc == 0) { // Skip getSiginfo/sighandler/sigtrampgo/sigtramp/handler.