]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
target/i386: Inline GDB_FORCE_64 definition
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 17 Feb 2026 08:15:04 +0000 (09:15 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Wed, 25 Feb 2026 22:46:04 +0000 (23:46 +0100)
Directly checking TARGET_LONG_BITS allows to remove GDB_FORCE_64.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20260219191955.83815-4-philmd@linaro.org>

target/i386/gdbstub.c

index be41601cffc05ac8525ca857f62eb6a4d5bb7e71..291d56b8e132c380aaf249def02ebaed9900e22b 100644 (file)
@@ -79,15 +79,9 @@ static const int gpr_map32[8] = { 0, 1, 2, 3, 4, 5, 6, 7 };
 #define IDX_CTL_CR8_REG     (IDX_CTL_REGS + 4)
 #define IDX_CTL_EFER_REG    (IDX_CTL_REGS + 5)
 
-#ifdef TARGET_X86_64
-#define GDB_FORCE_64 1
-#else
-#define GDB_FORCE_64 0
-#endif
-
 static int gdb_read_reg_cs64(uint32_t hflags, GByteArray *buf, target_ulong val)
 {
-    if ((hflags & HF_CS64_MASK) || GDB_FORCE_64) {
+    if ((hflags & HF_CS64_MASK) || TARGET_LONG_BITS == 64) {
         return gdb_get_reg64(buf, val);
     }
     return gdb_get_reg32(buf, val);