diff options
author | Taylor Simpson <tsimpson@quicinc.com> | 2021-04-08 20:07:44 -0500 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2021-05-01 08:31:43 -0700 |
commit | 85580a65577898288a29d849160601895979c661 (patch) | |
tree | 2c6c9380ea595c65775204997cdc871288e0b545 /target/hexagon/internal.h | |
parent | a33872eb533c5b4d2eb7658fa07e6a281bfd609b (diff) |
Hexagon (target/hexagon) compile all debug code
Change #if HEX_DEBUG to if (HEX_DEBUG) so the debug code doesn't bit rot
Suggested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <1617930474-31979-17-git-send-email-tsimpson@quicinc.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/hexagon/internal.h')
-rw-r--r-- | target/hexagon/internal.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/target/hexagon/internal.h b/target/hexagon/internal.h index 2da85c8606..6b20affdfa 100644 --- a/target/hexagon/internal.h +++ b/target/hexagon/internal.h @@ -22,11 +22,12 @@ * Change HEX_DEBUG to 1 to turn on debugging output */ #define HEX_DEBUG 0 -#if HEX_DEBUG -#define HEX_DEBUG_LOG(...) qemu_log(__VA_ARGS__) -#else -#define HEX_DEBUG_LOG(...) do { } while (0) -#endif +#define HEX_DEBUG_LOG(...) \ + do { \ + if (HEX_DEBUG) { \ + qemu_log(__VA_ARGS__); \ + } \ + } while (0) int hexagon_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg); int hexagon_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg); |