summaryrefslogtreecommitdiff
path: root/gdb/regcache.h
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2018-02-21 11:20:03 +0000
committerYao Qi <yao.qi@linaro.org>2018-02-21 11:20:03 +0000
commit796bb0264184e8d9343f041c2f11cb898c0d18ac (patch)
treebc3f8e9ef754550d16e4b29be380d3309cc45e10 /gdb/regcache.h
parent215c69dc9a7d8f868198b5523abcf41458fb6e4a (diff)
downloadbinutils-gdb-796bb0264184e8d9343f041c2f11cb898c0d18ac.tar.gz
Remove regcache::m_readonly_p
Now, m_readonly_p is always false, so we can remove it, and regcache no longer includes pseudo registers. Some regcache methods are lift up to its parent class, like reg_buffer or detached_regcache. gdb: 2018-02-21 Yao Qi <yao.qi@linaro.org> * regcache.c (regcache::regcache): Update. (regcache::invalidate): Move it to detached_regcache::invalidate. (get_thread_arch_aspace_regcache): Update. (regcache::raw_update): Update. (regcache::cooked_read): Remove some code. (regcache::cooked_read_value): Likewise. (regcache::raw_write): Remove assert on m_readonly_p. (regcache::raw_supply_integer): Move it to detached_regcache::raw_supply_integer. (regcache::raw_supply_zeroed): Likewise. * regcache.h (detached_regcache) <raw_supply_integer>: New declaration. <raw_supply_zeroed, invalidate>: Likewise. (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed. <invalidate>: Likewise. <m_readonly_p>: Removed.
Diffstat (limited to 'gdb/regcache.h')
-rw-r--r--gdb/regcache.h22
1 files changed, 8 insertions, 14 deletions
diff --git a/gdb/regcache.h b/gdb/regcache.h
index 6531afff254..289b72197f7 100644
--- a/gdb/regcache.h
+++ b/gdb/regcache.h
@@ -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);
};
@@ -338,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,
@@ -373,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:
@@ -391,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;