From a46392f2434465ec326643e807d221412d978977 Mon Sep 17 00:00:00 2001 From: hrydgard Date: Sun, 14 Dec 2008 21:55:10 +0000 Subject: [PATCH] linux build fix, hopefully git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1541 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/MemTools.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/Src/MemTools.cpp b/Source/Core/Core/Src/MemTools.cpp index e9991b791d..91723281df 100644 --- a/Source/Core/Core/Src/MemTools.cpp +++ b/Source/Core/Core/Src/MemTools.cpp @@ -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. mcontext_t *ctx = &context->uc_mcontext; +#ifdef _M_X64 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)) { // Let's not prevent debugging. 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_RIP] = (u64)new_rip; #else - ctx->gregs[REG_EAX] = fake_ctx.Rax; + ctx->gregs[REG_EAX] = fake_ctx.Eax; ctx->gregs[REG_EIP] = (u32)new_rip; #endif }