bsd: update segfault context for arm64

This commit is contained in:
scribam 2024-02-20 13:00:05 +01:00 committed by flyinghead
parent c8462e1f78
commit 9a119e7646
1 changed files with 9 additions and 0 deletions

View File

@ -65,6 +65,15 @@ static void context_segfault(host_context_t* hostctx, void* segfault_ctx)
#if defined(__APPLE__)
bicopy<ToSegfault>(hostctx->pc, MCTX(->__ss.__pc));
bicopy<ToSegfault>(hostctx->x0, MCTX(->__ss.__x[0]));
#elif defined(__FreeBSD__)
bicopy<ToSegfault>(hostctx->pc, MCTX(.mc_gpregs.gp_elr));
bicopy<ToSegfault>(hostctx->x0, MCTX(.mc_gpregs.gp_x[0]));
#elif defined(__NetBSD__)
bicopy<ToSegfault>(hostctx->pc, MCTX(.__gregs[_REG_ELR]));
bicopy<ToSegfault>(hostctx->x0, MCTX(.__gregs[_REG_X0]));
#elif defined(__OpenBSD__)
bicopy<ToSegfault>(hostctx->pc, MCTX(->sc_elr));
bicopy<ToSegfault>(hostctx->x0, MCTX(->sc_x[0]));
#else
bicopy<ToSegfault>(hostctx->pc, MCTX(.pc));
bicopy<ToSegfault>(hostctx->x0, MCTX(.regs[0]));