@samitouri / QOSamiQemu / commits / e015ae3074

target/i386: Inline GDB_FORCE_64 definition

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>

Philippe Mathieu-Daudé committed Feb 17, 2026 at 09:15 UTC e015ae3074fb22134888e41c9c30af548f165d14
1 file changed +1 -7
target/i386/gdbstub.c
+1 -7
@@ -79,15 +79,9 @@ static const int gpr_map32[8] = { 0, 1, 2, 3, 4, 5, 6, 7 };
79 #define IDX_CTL_CR8_REG (IDX_CTL_REGS + 4)
80 #define IDX_CTL_EFER_REG (IDX_CTL_REGS + 5)
81
82 -#ifdef TARGET_X86_64
83 -#define GDB_FORCE_64 1
84 -#else
85 -#define GDB_FORCE_64 0
86 -#endif
87 -
82 static int gdb_read_reg_cs64(uint32_t hflags, GByteArray *buf, target_ulong val)
83 {
90 - if ((hflags & HF_CS64_MASK) || GDB_FORCE_64) {
84 + if ((hflags & HF_CS64_MASK) || TARGET_LONG_BITS == 64) {
85 return gdb_get_reg64(buf, val);
86 }
87 return gdb_get_reg32(buf, val);