summaryrefslogtreecommitdiff
path: root/gdb/i386-bsd-nat.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/i386-bsd-nat.h')
-rw-r--r--gdb/i386-bsd-nat.h22
1 files changed, 18 insertions, 4 deletions
diff --git a/gdb/i386-bsd-nat.h b/gdb/i386-bsd-nat.h
index 72eec392747..2d9d7c176d5 100644
--- a/gdb/i386-bsd-nat.h
+++ b/gdb/i386-bsd-nat.h
@@ -20,9 +20,23 @@
#ifndef I386_BSD_NAT_H
#define I386_BSD_NAT_H
-/* Create a prototype *BSD/i386 target. The client can override it
- with local methods. */
-
-extern struct target_ops *i386bsd_target (void);
+/* Helper functions. See definitions. */
+extern void i386bsd_fetch_inferior_registers (struct regcache *regcache,
+ int regnum);
+extern void i386bsd_store_inferior_registers (struct regcache *regcache,
+ int regnum);
+
+/* A prototype *BSD/i386 target. */
+
+template<typename BaseTarget>
+class i386_bsd_nat_target : public x86bsd_nat_target<BaseTarget>
+{
+public:
+ void fetch_registers (struct regcache *regcache, int regnum) override
+ { i386bsd_fetch_inferior_registers (regcache, regnum); }
+
+ void store_registers (struct regcache *regcache, int regnum) override
+ { i386bsd_store_inferior_registers (regcache, regnum); }
+};
#endif /* i386-bsd-nat.h */