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>
#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"
/*
#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_ */