proc-events.c: fix compilation on Solaris
[deliverable/binutils-gdb.git] / gdb / regcache.h
index a377d2d4defd34d86a169775b14885b204281770..d7bb8b5c932a6447d4a7d3d93f211a019a6bf004 100644 (file)
@@ -297,6 +297,13 @@ public:
   void raw_update (int regnum) override
   {}
 
+  void raw_supply_integer (int regnum, const gdb_byte *addr, int addr_len,
+                          bool is_signed);
+
+  void raw_supply_zeroed (int regnum);
+
+  void invalidate (int regnum);
+
   DISABLE_COPY_AND_ASSIGN (detached_regcache);
 };
 
@@ -307,16 +314,6 @@ class readonly_detached_regcache;
 class regcache : public detached_regcache
 {
 public:
-  regcache (gdbarch *gdbarch)
-    : regcache (gdbarch, nullptr, true)
-  {}
-
-  struct readonly_t {};
-  static constexpr readonly_t readonly {};
-
-  /* Create a readonly regcache from a non-readonly regcache.  */
-  regcache (readonly_t, const regcache &src);
-
   DISABLE_COPY_AND_ASSIGN (regcache);
 
   /* Return REGCACHE's address space.  */
@@ -348,13 +345,6 @@ public:
   void raw_collect_integer (int regnum, gdb_byte *addr, int addr_len,
                            bool is_signed) const;
 
-  void raw_supply_integer (int regnum, const gdb_byte *addr, int addr_len,
-                          bool is_signed);
-
-  void raw_supply_zeroed (int regnum);
-
-  void invalidate (int regnum);
-
   void raw_write_part (int regnum, int offset, int len, const gdb_byte *buf);
 
   void cooked_write_part (int regnum, int offset, int len,
@@ -383,7 +373,7 @@ public:
 
   static void regcache_thread_ptid_changed (ptid_t old_ptid, ptid_t new_ptid);
 protected:
-  regcache (gdbarch *gdbarch, const address_space *aspace_, bool readonly_p_);
+  regcache (gdbarch *gdbarch, const address_space *aspace_);
   static std::forward_list<regcache *> current_regcache;
 
 private:
@@ -401,12 +391,6 @@ private:
      makes sense, like PC or SP).  */
   const address_space * const m_aspace;
 
-  /* Is this a read-only cache?  A read-only cache is used for saving
-     the target's register state (e.g, across an inferior function
-     call or just before forcing a function return).  A read-only
-     cache can only be created via a constructor.  The actual contents
-     are determined by the save and restore methods.  */
-  const bool m_readonly_p;
   /* If this is a read-write cache, which thread's registers is
      it connected to?  */
   ptid_t m_ptid;
@@ -443,4 +427,24 @@ public:
 extern void registers_changed (void);
 extern void registers_changed_ptid (ptid_t);
 
+/* An abstract base class for register dump.  */
+
+class register_dump
+{
+public:
+  void dump (ui_file *file);
+  virtual ~register_dump () = default;
+
+protected:
+  register_dump (gdbarch *arch)
+    : m_gdbarch (arch)
+  {}
+
+  /* Dump the register REGNUM contents.  If REGNUM is -1, print the
+     header.  */
+  virtual void dump_reg (ui_file *file, int regnum) = 0;
+
+  gdbarch *m_gdbarch;
+};
+
 #endif /* REGCACHE_H */
This page took 0.025261 seconds and 4 git commands to generate.