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
-5e76d81ec120e05a59e6c7d173ddf8a3de466bd0
+6cb7b9e924d84125f21f4a2a96aa0d59466056fe
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
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) {