diff options
author | John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> | 2021-02-22 22:18:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-22 16:18:45 -0500 |
commit | a2d7f453c635e90b356017dd47049b89407c2d88 (patch) | |
tree | 71f0ef9bc5040e924ed497495b43f1cffab4fefc /absl/debugging | |
parent | 0b5af594fc200b77b130dd65d2412bdd8e1e2c76 (diff) |
Add support for more Linux architectures (#904)
* Add support for alpha
* Add support for hppa
* Add support for ia64
* Add support for sh
Diffstat (limited to 'absl/debugging')
-rw-r--r-- | absl/debugging/internal/examine_stack.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/absl/debugging/internal/examine_stack.cc b/absl/debugging/internal/examine_stack.cc index c9fcb1f..589a3ef 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<ucontext_t*>(vuc); #if defined(__aarch64__) return reinterpret_cast<void*>(context->uc_mcontext.pc); +#elif defined(__alpha__) + return reinterpret_cast<void*>(context->uc_mcontext.sc_pc); #elif defined(__arm__) return reinterpret_cast<void*>(context->uc_mcontext.arm_pc); +#elif defined(__hppa__) + return reinterpret_cast<void*>(context->uc_mcontext.sc_iaoq[0]); #elif defined(__i386__) if (14 < ABSL_ARRAYSIZE(context->uc_mcontext.gregs)) return reinterpret_cast<void*>(context->uc_mcontext.gregs[14]); +#elif defined(__ia64__) + return reinterpret_cast<void*>(context->uc_mcontext.sc_ip); #elif defined(__m68k__) return reinterpret_cast<void*>(context->uc_mcontext.gregs[16]); #elif defined(__mips__) @@ -65,6 +71,8 @@ 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(__sh__) + return reinterpret_cast<void*>(context->uc_mcontext.pc); #elif defined(__sparc__) && !defined(__arch64__) return reinterpret_cast<void*>(context->uc_mcontext.gregs[19]); #elif defined(__sparc__) && defined(__arch64__) |