diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-11-30 14:02:28 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-11-30 14:02:28 +0100 |
| commit | 51aa4b0416fbd9e960b5699dde5f573d89b54ae4 (patch) | |
| tree | ceabba3bcf4e3a9ffe080fa8063563bd30016cf9 /src/libtools | |
| parent | b0db168fb57dd63e101c99b8c728aff9039a23bc (diff) | |
| download | box64-51aa4b0416fbd9e960b5699dde5f573d89b54ae4.tar.gz box64-51aa4b0416fbd9e960b5699dde5f573d89b54ae4.zip | |
Added a new memExist helper function and use it instead of getMmapped were it make sense
Diffstat (limited to 'src/libtools')
| -rw-r--r-- | src/libtools/signal32.c | 2 | ||||
| -rw-r--r-- | src/libtools/signals.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libtools/signal32.c b/src/libtools/signal32.c index 1c7ada71..0cf9e440 100644 --- a/src/libtools/signal32.c +++ b/src/libtools/signal32.c @@ -621,7 +621,7 @@ void my_sigactionhandler_oldcode_32(int32_t sig, int simple, siginfo_t* info, vo TRAP_x86_CACHEFLT = 19 // SIMD exception (via SIGFPE) if CPU is SSE capable otherwise Cache flush exception (via SIGSEV) */ uint32_t prot = getProtection((uintptr_t)info->si_addr); - uint32_t mmapped = getMmapped((uintptr_t)info->si_addr); + uint32_t mmapped = memExist((uintptr_t)info->si_addr); uint32_t real_prot = 0; if(prot&PROT_READ) real_prot|=PROT_READ; if(prot&PROT_WRITE) real_prot|=PROT_WRITE; diff --git a/src/libtools/signals.c b/src/libtools/signals.c index 395334e9..3bf37f50 100644 --- a/src/libtools/signals.c +++ b/src/libtools/signals.c @@ -1145,7 +1145,7 @@ void my_sigactionhandler_oldcode(x64emu_t* emu, int32_t sig, int simple, siginfo TRAP_x86_CACHEFLT = 19 // SIMD exception (via SIGFPE) if CPU is SSE capable otherwise Cache flush exception (via SIGSEV) */ uint32_t prot = getProtection((uintptr_t)info->si_addr); - uint32_t mmapped = getMmapped((uintptr_t)info->si_addr); + uint32_t mmapped = memExist((uintptr_t)info->si_addr); uint32_t real_prot = 0; if(prot&PROT_READ) real_prot|=PROT_READ; if(prot&PROT_WRITE) real_prot|=PROT_WRITE; @@ -1620,7 +1620,7 @@ dynarec_log(/*LOG_DEBUG*/LOG_INFO, "Repeated SIGSEGV with Access error on %p for static int old_tid = 0; static uint32_t old_prot = 0; int tid = GetTID(); - int mapped = getMmapped((uintptr_t)addr); + int mapped = memExist((uintptr_t)addr); const char* signame = (sig==SIGSEGV)?"SIGSEGV":((sig==SIGBUS)?"SIGBUS":((sig==SIGILL)?"SIGILL":"SIGABRT")); if(old_code==info->si_code && old_pc==pc && old_addr==addr && old_tid==tid && old_prot==prot) { printf_log(log_minimum, "%04d|Double %s (code=%d, pc=%p, addr=%p, prot=%02x)!\n", tid, signame, old_code, old_pc, old_addr, prot); |