gdb: Fix an infrun debug log message
[deliverable/binutils-gdb.git] / gdb / linux-nat-trad.h
index 3b4a6c8595a92fed6dc63ee76570d39493d65d9f..240a95139c25e4d86f9b3bbbe8641a939a1ff8ea 100644 (file)
 
 #include "linux-nat.h"
 
-/* Create a generic GNU/Linux target using traditional
-   ptrace register access.  */
-struct target_ops *linux_trad_target
-  (CORE_ADDR (*register_u_offset)(struct gdbarch *, int, int));
+/* A prototype GNU/Linux target using traditional ptrace register
+   access.  A concrete type should override REGISTER_U_OFFSET.  */
+
+class linux_nat_trad_target : public linux_nat_target
+{
+public:
+  void fetch_registers (struct regcache *, int) override;
+  void store_registers (struct regcache *, int) override;
+
+protected:
+  /* Return the offset within the user area where a particular
+     register is stored.  */
+  virtual CORE_ADDR register_u_offset (struct gdbarch *gdbarch,
+                                      int regnum, int store) = 0;
+
+private:
+  /* Helpers.  See definition.  */
+  void fetch_register (struct regcache *regcache, int regnum);
+  void store_register (const struct regcache *regcache, int regnum);
+};
 
 #endif /* LINUX_NAT_TRAD_H */
This page took 0.026865 seconds and 4 git commands to generate.