From 6267af03157fa2b48fea743e4e7347bbc4d48cf5 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Thu, 21 Mar 2019 15:13:53 +0100 Subject: [PATCH] sigsegv.cpp: Add addr32 decode With this fix I can compile with ./configure --enable-addressing=direct,0x100000 and then I don't need to change vm.mmap_min_addr and hence without root privileges --- BasiliskII/src/CrossPlatform/sigsegv.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/BasiliskII/src/CrossPlatform/sigsegv.cpp b/BasiliskII/src/CrossPlatform/sigsegv.cpp index f1322d1e..0286076f 100644 --- a/BasiliskII/src/CrossPlatform/sigsegv.cpp +++ b/BasiliskII/src/CrossPlatform/sigsegv.cpp @@ -1018,6 +1018,14 @@ static bool ix86_skip_instruction(SIGSEGV_REGISTER_TYPE * regs) transfer_size = SIZE_WORD; } +#if defined(__x86_64__) || defined(_M_X64) + // addr32 + if (*eip == 0x67) { + eip++; + len++; + } +#endif + // REX prefix #if defined(__x86_64__) || defined(_M_X64) struct rex_t {