Add RISCV support to GetProgramCounter() (#621)

Identify PC register from signal context

Signed-off-by: Khem Raj <raj.khem@gmail.com>
pull/629/head
Khem Raj 5 years ago committed by GitHub
parent 0232c87f21
commit f9b3d6e493
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      absl/debugging/internal/examine_stack.cc

@ -53,6 +53,8 @@ void* GetProgramCounter(void* vuc) {
return reinterpret_cast<void*>(context->uc_mcontext.gp_regs[32]);
#elif defined(__powerpc__)
return reinterpret_cast<void*>(context->uc_mcontext.regs->nip);
#elif defined(__riscv)
return reinterpret_cast<void*>(context->uc_mcontext.__gregs[REG_PC]);
#elif defined(__s390__) && !defined(__s390x__)
return reinterpret_cast<void*>(context->uc_mcontext.psw.addr & 0x7fffffff);
#elif defined(__s390__) && defined(__s390x__)

Loading…
Cancel
Save