linux build fix, hopefully

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1541 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard 2008-12-14 21:55:10 +00:00
parent 1a8cbd7b95
commit a46392f243
1 changed files with 5 additions and 2 deletions

View File

@ -184,8 +184,11 @@ void sigsegv_handler(int signal, siginfo_t *info, void *raw_context)
// Get all the information we can out of the context. // Get all the information we can out of the context.
mcontext_t *ctx = &context->uc_mcontext; mcontext_t *ctx = &context->uc_mcontext;
#ifdef _M_X64
u8 *fault_instruction_ptr = (u8 *)ctx->gregs[REG_RIP]; u8 *fault_instruction_ptr = (u8 *)ctx->gregs[REG_RIP];
#else
u8 *fault_instruction_ptr = (u8 *)ctx->gregs[REG_EIP];
#endif
if (!Jit64::IsInJitCode((const u8 *)fault_instruction_ptr)) { if (!Jit64::IsInJitCode((const u8 *)fault_instruction_ptr)) {
// Let's not prevent debugging. // Let's not prevent debugging.
return; return;
@ -218,7 +221,7 @@ void sigsegv_handler(int signal, siginfo_t *info, void *raw_context)
ctx->gregs[REG_RAX] = fake_ctx.Rax; ctx->gregs[REG_RAX] = fake_ctx.Rax;
ctx->gregs[REG_RIP] = (u64)new_rip; ctx->gregs[REG_RIP] = (u64)new_rip;
#else #else
ctx->gregs[REG_EAX] = fake_ctx.Rax; ctx->gregs[REG_EAX] = fake_ctx.Eax;
ctx->gregs[REG_EIP] = (u32)new_rip; ctx->gregs[REG_EIP] = (u32)new_rip;
#endif #endif
} }