On 1/6/26 3:19 PM, Philippe Mathieu-Daudé wrote:
Currently "exec/breakpoint.h" contains both BreakPoint *and* WatchPoint APIs, however very few files requires the former, and more the latter:$ git grep -l CPUBreakpoint | wc -l 12 $ git grep -l CPUWatchpoint | wc -l 25 So extracting the WatchPoint API to its own header will reduce compilation pressure. But more importantly, the API is scattered in two distinct headers. Unify them ("accel/tcg/cpu-ops.h" and "exec/watchpoint.h") to the new "accel/tcg/watchpoint.h" header, making the emphasis the API is specific to TCG. Have accel/tcg/watchpoint.c absorb system/watchpoint.c code. Signed-off-by: Philippe Mathieu-Daudé <[email protected]> --- MAINTAINERS | 1 - include/accel/tcg/cpu-ops.h | 28 +------- include/accel/tcg/watchpoint.h | 57 ++++++++++++++++ include/exec/breakpoint.h | 10 --- include/exec/watchpoint.h | 18 ----- include/hw/core/cpu.h | 3 +- target/arm/internals.h | 2 +- target/ppc/internal.h | 2 +- target/riscv/debug.h | 2 +- accel/tcg/cputlb.c | 1 + accel/tcg/tcg-accel-ops.c | 2 +- accel/tcg/user-exec-stub.c | 3 +- accel/tcg/watchpoint.c | 83 +++++++++++++++++++++- system/watchpoint.c | 102 ---------------------------- target/arm/debug_helper.c | 2 +- target/arm/tcg/mte_helper.c | 2 +- target/arm/tcg/sve_helper.c | 2 +- target/i386/cpu.c | 2 +- target/i386/machine.c | 2 +- target/i386/tcg/system/bpt_helper.c | 2 +- target/ppc/cpu.c | 2 +- target/ppc/cpu_init.c | 2 +- target/riscv/cpu_helper.c | 2 +- target/riscv/debug.c | 2 +- target/s390x/helper.c | 2 +- target/s390x/tcg/debug.c | 2 +- target/s390x/tcg/excp_helper.c | 2 +- target/s390x/tcg/mem_helper.c | 1 + target/xtensa/dbg_helper.c | 2 +- system/meson.build | 1 - 30 files changed, 162 insertions(+), 182 deletions(-) create mode 100644 include/accel/tcg/watchpoint.h delete mode 100644 include/exec/watchpoint.h delete mode 100644 system/watchpoint.c
Reviewed-by: Pierrick Bouvier <[email protected]>
