about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorYang Liu <liuyang22@iscas.ac.cn>2025-08-01 17:46:49 +0800
committerGitHub <noreply@github.com>2025-08-01 11:46:49 +0200
commitea804a52613dc91267a3cc591613680ccadea9a9 (patch)
treeb9bb8823e50d781358d77195f00f8799e5b18943
parenta17811f4a615f417a5742dde62ab683cf80020b0 (diff)
downloadbox64-ea804a52613dc91267a3cc591613680ccadea9a9.tar.gz
box64-ea804a52613dc91267a3cc591613680ccadea9a9.zip
[TRACE] Minor improvements to trace logging (#2871)
-rw-r--r--src/emu/x64emu.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/emu/x64emu.c b/src/emu/x64emu.c
index 7627d4bb..9d6f4a8b 100644
--- a/src/emu/x64emu.c
+++ b/src/emu/x64emu.c
@@ -438,6 +438,8 @@ const char* DumpCPURegs(x64emu_t* emu, uintptr_t ip, int is32bits)
                     strcat(buff, tmp);
 #undef FLAG_CHAR
                 }
+            } else {
+                strcat(buff, " ");
             }
         }
     else
@@ -470,12 +472,14 @@ const char* DumpCPURegs(x64emu_t* emu, uintptr_t ip, int is32bits)
                 } else {
                     strcat(buff, "\n");
                 }
+            } else {
+                strcat(buff, " ");
             }
     }
     if(is32bits)
-        sprintf(tmp, "EIP=%08" PRIx64, ip);
+        sprintf(tmp, "EIP=%08" PRIx64 " ", ip);
     else
-        sprintf(tmp, "RIP=%016" PRIx64, ip);
+        sprintf(tmp, "RIP=%016" PRIx64 " ", ip);
     strcat(buff, tmp);
     return buff;
 }