Add RISCV support to GetProgramCounter() (#621)
Identify PC register from signal context Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
parent
0232c87f21
commit
f9b3d6e493
1 changed files with 2 additions and 0 deletions
|
@ -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…
Reference in a new issue