Switch the inferior too in switch_to_program_space_and_thread
[deliverable/binutils-gdb.git] / gdb / i386-bsd-nat.h
index 4e70ff1c49fb9a2b05827959c2d35ea84bc6f345..f1c4fc6dfa072307c9ff6312621210320c3b44c0 100644 (file)
@@ -1,6 +1,6 @@
 /* Native-dependent code for modern i386 BSD's.
 
-   Copyright (C) 2004-2017 Free Software Foundation, Inc.
+   Copyright (C) 2004-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
 #ifndef I386_BSD_NAT_H
 #define I386_BSD_NAT_H
 
-/* Create a prototype *BSD/i386 target.  The client can override it
-   with local methods.  */
+/* 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);
 
-extern struct target_ops *i386bsd_target (void);
+/* 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 */
This page took 0.026315 seconds and 4 git commands to generate.