about summary refs log tree commit diff stats
path: root/src/main.c
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2023-05-08 15:20:52 +0200
committerptitSeb <sebastien.chev@gmail.com>2023-05-08 15:20:52 +0200
commit7db5b33284eb1611ec1ae15b030ef146f6b46c1c (patch)
tree66f5359a63d7dcd991d04c835f6c7c54ad85d00a /src/main.c
parent6607ddb15daeec7f54504a907e5db5013d3da618 (diff)
downloadbox64-7db5b33284eb1611ec1ae15b030ef146f6b46c1c.tar.gz
box64-7db5b33284eb1611ec1ae15b030ef146f6b46c1c.zip
Some small changes to thread and fork and cloning x64emu_t struct
Diffstat (limited to 'src/main.c')
-rwxr-xr-xsrc/main.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index aebe557a..77e2274c 100755
--- a/src/main.c
+++ b/src/main.c
@@ -1366,8 +1366,13 @@ int main(int argc, const char **argv, char **env) {
             wine_prereserve(prereserve);
         // special case for winedbg, doesn't work anyway
         if(argv[nextarg+1] && strstr(argv[nextarg+1], "winedbg")==argv[nextarg+1]) {
-            printf_log(LOG_NONE, "winedbg detected, not launching it!\n");
-            exit(0);    // exiting, it doesn't work anyway
+            if(getenv("BOX64_WINEDBG")) {
+                box64_nobanner = 1;
+                box64_log = 0;
+            } else {
+                printf_log(LOG_NONE, "winedbg detected, not launching it!\n");
+                exit(0);    // exiting, it doesn't work anyway
+            }
         }
         box64_wine = 1;
     } else 
@@ -1692,7 +1697,7 @@ int main(int argc, const char **argv, char **env) {
     x64emu_t *emu = NewX64Emu(my_context, my_context->ep, (uintptr_t)my_context->stack, my_context->stacksz, 0);
     // stack setup is much more complicated then just that!
     SetupInitialStack(emu); // starting here, the argv[] don't need free anymore
-    SetupX64Emu(emu);
+    SetupX64Emu(emu, NULL);
     SetRSI(emu, my_context->argc);
     SetRDX(emu, (uint64_t)my_context->argv);
     SetRCX(emu, (uint64_t)my_context->envv);