1 /*
2 * CPU watchpoints
3 *
4 * Copyright (c) 2012 SUSE LINUX Products GmbH
5 * SPDX-License-Identifier: LGPL-2.1-or-later
6 */
7
8 #ifndef EXEC_WATCHPOINT_H
9 #define EXEC_WATCHPOINT_H
10
11 #if defined(CONFIG_USER_ONLY)
cpu_watchpoint_insert(CPUState * cpu,vaddr addr,vaddr len,int flags,CPUWatchpoint ** watchpoint)12 static inline int cpu_watchpoint_insert(CPUState *cpu, vaddr addr, vaddr len,
13 int flags, CPUWatchpoint **watchpoint)
14 {
15 return -ENOSYS;
16 }
17
cpu_watchpoint_remove(CPUState * cpu,vaddr addr,vaddr len,int flags)18 static inline int cpu_watchpoint_remove(CPUState *cpu, vaddr addr,
19 vaddr len, int flags)
20 {
21 return -ENOSYS;
22 }
23
cpu_watchpoint_remove_by_ref(CPUState * cpu,CPUWatchpoint * wp)24 static inline void cpu_watchpoint_remove_by_ref(CPUState *cpu,
25 CPUWatchpoint *wp)
26 {
27 }
28
cpu_watchpoint_remove_all(CPUState * cpu,int mask)29 static inline void cpu_watchpoint_remove_all(CPUState *cpu, int mask)
30 {
31 }
32 #else
33 int cpu_watchpoint_insert(CPUState *cpu, vaddr addr, vaddr len,
34 int flags, CPUWatchpoint **watchpoint);
35 int cpu_watchpoint_remove(CPUState *cpu, vaddr addr,
36 vaddr len, int flags);
37 void cpu_watchpoint_remove_by_ref(CPUState *cpu, CPUWatchpoint *watchpoint);
38 void cpu_watchpoint_remove_all(CPUState *cpu, int mask);
39 #endif
40
41 #endif /* EXEC_WATCHPOINT_H */
42