]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
gdbstub: Simplify #ifdef'ry in helpers.h
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Fri, 22 Mar 2024 15:11:47 +0000 (16:11 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Fri, 26 Apr 2024 13:31:37 +0000 (15:31 +0200)
Slightly simplify by checking NEED_CPU_H definition in header.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20240322161439.6448-2-philmd@linaro.org>

include/gdbstub/helpers.h

index 6b97610f480be9368b954f11dcbb8854c506bd9b..6277a858a111be8e7010fce0dca5180f0e3a542e 100644 (file)
 #ifndef _GDBSTUB_HELPERS_H_
 #define _GDBSTUB_HELPERS_H_
 
-#ifdef COMPILING_PER_TARGET
+#ifndef COMPILING_PER_TARGET
+#error "gdbstub helpers should only be included by target specific code"
+#endif
+
 #include "cpu.h"
 
 /*
@@ -96,8 +99,4 @@ static inline uint8_t *gdb_get_reg_ptr(GByteArray *buf, int len)
 #define ldtul_p(addr) ldl_p(addr)
 #endif
 
-#else
-#error "gdbstub helpers should only be included by target specific code"
-#endif
-
 #endif /* _GDBSTUB_HELPERS_H_ */