about summary refs log tree commit diff stats
path: root/src/libtools
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2023-02-18 15:06:40 +0100
committerptitSeb <sebastien.chev@gmail.com>2023-02-18 15:06:40 +0100
commit9705d5e38bdf4ec72daf480de0830dfde6e33a70 (patch)
tree3c64f69ae2c5569bfe0fa91f321149ce49991c02 /src/libtools
parent2e59b56f1691227e4a93ac1c2dd844adcc6334cd (diff)
downloadbox64-9705d5e38bdf4ec72daf480de0830dfde6e33a70.tar.gz
box64-9705d5e38bdf4ec72daf480de0830dfde6e33a70.zip
Preliminary work to get steamwebhelper working
Diffstat (limited to 'src/libtools')
-rwxr-xr-xsrc/libtools/signals.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libtools/signals.c b/src/libtools/signals.c
index a3f0b796..9ab18a75 100755
--- a/src/libtools/signals.c
+++ b/src/libtools/signals.c
@@ -855,7 +855,7 @@ void my_box64signalhandler(int32_t sig, siginfo_t* info, void * ucntx)
     }
     dynablock_t* db = NULL;
     int db_searched = 0;
-    if ((sig==SIGSEGV) && (addr) && (info->si_code == SEGV_ACCERR) && (prot&PROT_CUSTOM)) {
+    if ((sig==SIGSEGV) && (addr) && (info->si_code == SEGV_ACCERR) && (prot&PROT_DYN)) {
         mutex_lock(&mutex_dynarec_prot);
         // check if SMC inside block
         db = FindDynablockFromNativeAddress(pc);
@@ -981,7 +981,7 @@ dynarec_log(/*LOG_DEBUG*/LOG_INFO, "Repeated SIGSEGV with Access error on %p for
         printf_log(log_minimum, "%04d|Double %s (code=%d, pc=%p, addr=%p)!\n", GetTID(), signame, old_code, old_pc, old_addr);
 exit(-1);
     } else {
-        if(sig==SIGSEGV && info->si_code==2 && ((prot&~PROT_CUSTOM)==5 || (prot&~PROT_CUSTOM)==7)) {
+        if(sig==SIGSEGV && info->si_code==2 && ((prot&~PROT_DYN)==5 || (prot&~PROT_DYN)==7)) {
             static uintptr_t old_addr = 0;
         printf_log(/*LOG_DEBUG*/LOG_INFO, "Strange SIGSEGV with Access error on %p for %p, db=%p, prot=0x%x (old_addr=%p)\n", pc, addr, db, prot, (void*)old_addr);
             if(old_addr!=(uintptr_t)addr) {
@@ -1105,7 +1105,6 @@ exit(-1);
                 free(strings);
             } else
                 printf_log(log_minimum, "EmulatedBT: none\n");
-printf_log(log_minimum, "RDI = %p, Prot=0x%02x, ElfName(RDI)=%s\n",(void*)R_RDI, getProtection(R_RDI), ElfName(FindElfAddress(my_context, R_RDI)));
             #define GO(A) R_##A = old_##A
             GO(RAX);
             GO(RBX);