From 3fcd00d7dddafe65ced638acca560105a414cba5 Mon Sep 17 00:00:00 2001 From: John Paul Adrian Glaubitz Date: Fri, 19 Feb 2021 02:09:05 +0100 Subject: Add support for sparc and sparc64 (#899) Fixes #893 --- absl/debugging/internal/examine_stack.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'absl/debugging') diff --git a/absl/debugging/internal/examine_stack.cc b/absl/debugging/internal/examine_stack.cc index dff5c604..299a107b 100644 --- a/absl/debugging/internal/examine_stack.cc +++ b/absl/debugging/internal/examine_stack.cc @@ -63,6 +63,10 @@ void* GetProgramCounter(void* vuc) { return reinterpret_cast(context->uc_mcontext.psw.addr & 0x7fffffff); #elif defined(__s390__) && defined(__s390x__) return reinterpret_cast(context->uc_mcontext.psw.addr); +#elif defined(__sparc__) && !defined(__arch64__) + return reinterpret_cast(context->uc_mcontext.gregs[19]); +#elif defined(__sparc__) && defined(__arch64__) + return reinterpret_cast(context->uc_mcontext.mc_gregs[19]); #elif defined(__x86_64__) if (16 < ABSL_ARRAYSIZE(context->uc_mcontext.gregs)) return reinterpret_cast(context->uc_mcontext.gregs[16]); -- cgit v1.2.3