From a2d7f453c635e90b356017dd47049b89407c2d88 Mon Sep 17 00:00:00 2001 From: John Paul Adrian Glaubitz Date: Mon, 22 Feb 2021 22:18:45 +0100 Subject: Add support for more Linux architectures (#904) * Add support for alpha * Add support for hppa * Add support for ia64 * Add support for sh --- absl/debugging/internal/examine_stack.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'absl/debugging') diff --git a/absl/debugging/internal/examine_stack.cc b/absl/debugging/internal/examine_stack.cc index c9fcb1f4..589a3ef3 100644 --- a/absl/debugging/internal/examine_stack.cc +++ b/absl/debugging/internal/examine_stack.cc @@ -46,11 +46,17 @@ void* GetProgramCounter(void* vuc) { ucontext_t* context = reinterpret_cast(vuc); #if defined(__aarch64__) return reinterpret_cast(context->uc_mcontext.pc); +#elif defined(__alpha__) + return reinterpret_cast(context->uc_mcontext.sc_pc); #elif defined(__arm__) return reinterpret_cast(context->uc_mcontext.arm_pc); +#elif defined(__hppa__) + return reinterpret_cast(context->uc_mcontext.sc_iaoq[0]); #elif defined(__i386__) if (14 < ABSL_ARRAYSIZE(context->uc_mcontext.gregs)) return reinterpret_cast(context->uc_mcontext.gregs[14]); +#elif defined(__ia64__) + return reinterpret_cast(context->uc_mcontext.sc_ip); #elif defined(__m68k__) return reinterpret_cast(context->uc_mcontext.gregs[16]); #elif defined(__mips__) @@ -65,6 +71,8 @@ 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(__sh__) + return reinterpret_cast(context->uc_mcontext.pc); #elif defined(__sparc__) && !defined(__arch64__) return reinterpret_cast(context->uc_mcontext.gregs[19]); #elif defined(__sparc__) && defined(__arch64__) -- cgit v1.2.3