[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 01/21] gdbstub: Simplify #ifdef'ry in helpers.h
|
From: |
Philippe Mathieu-Daudé |
|
Subject: |
[PATCH 01/21] gdbstub: Simplify #ifdef'ry in helpers.h |
|
Date: |
Wed, 17 Apr 2024 20:27:46 +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 | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/include/gdbstub/helpers.h b/include/gdbstub/helpers.h
index c573aef2dc..53e88d807c 100644
--- a/include/gdbstub/helpers.h
+++ b/include/gdbstub/helpers.h
@@ -12,7 +12,10 @@
#ifndef _GDBSTUB_HELPERS_H_
#define _GDBSTUB_HELPERS_H_
-#ifdef NEED_CPU_H
+#ifndef NEED_CPU_H
+#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_ */
--
2.41.0
- [PATCH 00/21] exec/next for 9.1, Philippe Mathieu-Daudé, 2024/04/17
- [PATCH 01/21] gdbstub: Simplify #ifdef'ry in helpers.h,
Philippe Mathieu-Daudé <=
- [PATCH 02/21] hw/core: Remove check on NEED_CPU_H in tcg-cpu-ops.h, Philippe Mathieu-Daudé, 2024/04/17
- [PATCH 03/21] exec: Rename NEED_CPU_H -> COMPILING_PER_TARGET, Philippe Mathieu-Daudé, 2024/04/17
- [PATCH 04/21] exec: Include 'cpu.h' before validating CPUArchState placement, Philippe Mathieu-Daudé, 2024/04/17
- [PATCH 05/21] exec: Expose 'target_page.h' API to user emulation, Philippe Mathieu-Daudé, 2024/04/17
- [PATCH 06/21] target: Define TCG_GUEST_DEFAULT_MO in 'cpu-param.h', Philippe Mathieu-Daudé, 2024/04/17
- [PATCH 07/21] accel: Include missing 'exec/cpu_ldst.h' header, Philippe Mathieu-Daudé, 2024/04/17
- [PATCH 08/21] gdbstub: Include missing 'hw/core/cpu.h' header, Philippe Mathieu-Daudé, 2024/04/17
- [PATCH 09/21] semihosting/uaccess: Avoid including 'cpu.h', Philippe Mathieu-Daudé, 2024/04/17