about summary refs log tree commit diff stats
path: root/src/core.c
diff options
context:
space:
mode:
authorYang Liu <liuyang22@iscas.ac.cn>2024-12-18 15:11:09 +0800
committerGitHub <noreply@github.com>2024-12-18 08:11:09 +0100
commit47f5fe7caf92ed5b96b8d6b3e34a098bc6c2643a (patch)
treea0e24c61b2996c11a37ae17abeca1bcfe0cb9166 /src/core.c
parent6e0f32f4ca4b35bda036caa6ad3abcae4ae64cdc (diff)
downloadbox64-47f5fe7caf92ed5b96b8d6b3e34a098bc6c2643a.tar.gz
box64-47f5fe7caf92ed5b96b8d6b3e34a098bc6c2643a.zip
[GDBJIT] Show x64pc in gdb, also added documentation (#2163)
* [GDBJIT] Show x64pc in gdb

* Add env. variable and documentation

* typo

* oops
Diffstat (limited to 'src/core.c')
-rw-r--r--src/core.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/core.c b/src/core.c
index ddb83ce2..5d7666b6 100644
--- a/src/core.c
+++ b/src/core.c
@@ -72,7 +72,6 @@ int box64_rdtsc_1ghz = 0;
 uint8_t box64_rdtsc_shift = 0;
 char* box64_insert_args = NULL;
 char* box64_new_args = NULL;
-int box64_dynarec_gdbjit = 1;
 #ifdef DYNAREC
 int box64_dynarec = 1;
 int box64_dynarec_dump = 0;
@@ -98,6 +97,7 @@ uintptr_t box64_nodynarec_start = 0;
 uintptr_t box64_nodynarec_end = 0;
 uintptr_t box64_dynarec_test_start = 0;
 uintptr_t box64_dynarec_test_end = 0;
+int box64_dynarec_gdbjit = 0;
 #ifdef ARM64
 int arm64_asimd = 0;
 int arm64_aes = 0;
@@ -901,6 +901,15 @@ void LoadLogEnv()
         if(!box64_dynarec_wait)
             printf_log(LOG_INFO, "Dynarec will not wait for FillBlock to ready and use Interpreter instead\n");
     }
+    p = getenv("BOX64_DYNAREC_GDBJIT");
+    if(p) {
+        if(strlen(p)==1) {
+            if(p[0]>='0' && p[0]<='1')
+                box64_dynarec_gdbjit = p[0]-'0';
+        }
+        if(box64_dynarec_gdbjit)
+            printf_log(LOG_INFO, "Dynarec will generate debuginfo for gdbjit\n");
+    }
     p = getenv("BOX64_DYNAREC_ALIGNED_ATOMICS");
     if(p) {
         if(strlen(p)==1) {