about summary refs log tree commit diff stats
path: root/src/main.c
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-01-27 20:42:32 +0100
committerptitSeb <sebastien.chev@gmail.com>2024-01-27 20:42:32 +0100
commitf9c09293bf5f8da518c995bef7d768f1f1f65e47 (patch)
treee9556da7d0c8c44d42c54d6733244976b66280c7 /src/main.c
parentcdffe2388ea2dbafd4c82e304fc228eaefe4ac94 (diff)
downloadbox64-f9c09293bf5f8da518c995bef7d768f1f1f65e47.tar.gz
box64-f9c09293bf5f8da518c995bef7d768f1f1f65e47.zip
Added BOX64_IGNOREINT3 env. var. to ignore INT3 in the code ([RCFILE] too)
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 267c84bd..f6b52ad4 100644
--- a/src/main.c
+++ b/src/main.c
@@ -55,6 +55,7 @@ int box64_maxcpu = 0;
 int box64_mmap32 = 1;
 #else
 int box64_mmap32 = 0;
+int box64_ignoreint3 = 0;
 #endif
 #ifdef DYNAREC
 int box64_dynarec = 1;
@@ -980,6 +981,15 @@ void LoadLogEnv()
         else
             printf_log(LOG_INFO, "Will not use 32bits address in priority for external MMAP (when 32bits process are detected)\n");
     }
+    p = getenv("BOX64_IGNOREINT3");
+        if(p) {
+        if(strlen(p)==1) {
+            if(p[0]>='0' && p[0]<='0'+1)
+                box64_ignoreint3 = p[0]-'0';
+        }
+        if(box64_ignoreint3)
+            printf_log(LOG_INFO, "Will silently ignore INT3 in the code\n");
+    }
     box64_pagesize = sysconf(_SC_PAGESIZE);
     if(!box64_pagesize)
         box64_pagesize = 4096;