aboutsummaryrefslogtreecommitdiff
path: root/sys/powerpc
diff options
context:
space:
mode:
authorMitchell Horne <mhorne@FreeBSD.org>2021-03-08 15:23:40 +0000
committerMitchell Horne <mhorne@FreeBSD.org>2021-04-21 13:20:33 +0000
commit45af63e5f89394219d56cc10e739be635fc6b116 (patch)
tree2567d5d03ca943af5da6f2fc86e4684a30318461 /sys/powerpc
parent47301dfb9abd30278eebd36d4f283e6bb256fffe (diff)
downloadsrc-45af63e5f89394219d56cc10e739be635fc6b116.tar.gz
src-45af63e5f89394219d56cc10e739be635fc6b116.zip
Introduce kdb-level watchpoint functions
This basically mirrors what already exists in ddb, but provides a slightly improved interface. It allows the caller to specify the watchpoint access type, and returns more specific error codes to differentiate failure cases. This will be used to support hardware watchpoints in gdb(4). Stubs are provided for architectures lacking hardware watchpoint logic (mips, powerpc, riscv), while other architectures are added individually in follow-up commits. Reviewed by: jhb, kib, markj Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. (cherry picked from commit 763107f26c3c3f4c8bb314a7cabc0a5548abff03)
Diffstat (limited to 'sys/powerpc')
-rw-r--r--sys/powerpc/include/kdb.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/powerpc/include/kdb.h b/sys/powerpc/include/kdb.h
index 74f3e390b423..78e4966eaaf0 100644
--- a/sys/powerpc/include/kdb.h
+++ b/sys/powerpc/include/kdb.h
@@ -54,4 +54,18 @@ kdb_cpu_trap(int vector, int _)
{
}
+static __inline int
+kdb_cpu_set_watchpoint(vm_offset_t addr, vm_size_t size, int access)
+{
+
+ return (ENXIO);
+}
+
+static __inline int
+kdb_cpu_clr_watchpoint(vm_offset_t addr, vm_size_t size)
+{
+
+ return (0);
+}
+
#endif /* _MACHINE_KDB_H_ */