summaryrefslogtreecommitdiff
path: root/absl/debugging/internal
diff options
context:
space:
mode:
authorGravatar John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>2021-02-19 02:09:05 +0100
committerGravatar GitHub <noreply@github.com>2021-02-18 20:09:05 -0500
commit3fcd00d7dddafe65ced638acca560105a414cba5 (patch)
tree471c1bf84bfa6e11343b3e2a01e49c510ce95393 /absl/debugging/internal
parent7055876380cc4c9061e654640b807767f428b0f3 (diff)
Add support for sparc and sparc64 (#899)
Fixes #893
Diffstat (limited to 'absl/debugging/internal')
-rw-r--r--absl/debugging/internal/examine_stack.cc4
1 files changed, 4 insertions, 0 deletions
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<void*>(context->uc_mcontext.psw.addr & 0x7fffffff);
#elif defined(__s390__) && defined(__s390x__)
return reinterpret_cast<void*>(context->uc_mcontext.psw.addr);
+#elif defined(__sparc__) && !defined(__arch64__)
+ return reinterpret_cast<void*>(context->uc_mcontext.gregs[19]);
+#elif defined(__sparc__) && defined(__arch64__)
+ return reinterpret_cast<void*>(context->uc_mcontext.mc_gregs[19]);
#elif defined(__x86_64__)
if (16 < ABSL_ARRAYSIZE(context->uc_mcontext.gregs))
return reinterpret_cast<void*>(context->uc_mcontext.gregs[16]);