diff options
author | Nikhil Benesch <nikhil.benesch@gmail.com> | 2020-10-13 06:51:30 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2020-10-13 22:21:53 -0700 |
commit | 7e5aeda340d71a84fbd15504e848a949b2a00d5a (patch) | |
tree | 20a7a0b1a241d3b612d36792032e91faf7f442a4 | |
parent | 7355c1df55e28f3298b14a621968f9a27fdcd2bf (diff) | |
download | gcc-7e5aeda340d71a84fbd15504e848a949b2a00d5a.zip gcc-7e5aeda340d71a84fbd15504e848a949b2a00d5a.tar.gz gcc-7e5aeda340d71a84fbd15504e848a949b2a00d5a.tar.bz2 |
runtime: populate signal PC on NetBSD
The NetBSD libc provides an architecture-independent macro that can
extract the PC from a ucontext struct.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/261740
-rw-r--r-- | gcc/go/gofrontend/MERGE | 2 | ||||
-rw-r--r-- | libgo/runtime/go-signal.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 80e702f..2c7a9bd 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -5e76d81ec120e05a59e6c7d173ddf8a3de466bd0 +6cb7b9e924d84125f21f4a2a96aa0d59466056fe 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 b429fdb..d30d160 100644 --- a/libgo/runtime/go-signal.c +++ b/libgo/runtime/go-signal.c @@ -229,6 +229,8 @@ getSiginfo(siginfo_t *info, void *context __attribute__((unused))) ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.jmp_context.iar; #elif defined(__aarch64__) && defined(__linux__) ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.pc; +#elif defined(__NetBSD__) + ret.sigpc = _UC_MACHINE_PC(((ucontext_t*)(context))); #endif if (ret.sigpc == 0) { |