summaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@ericsson.com>2018-05-30 14:54:41 -0400
committerSimon Marchi <simon.marchi@ericsson.com>2018-05-30 14:54:41 -0400
commit6aa7d72401387cacc5a7699520045ce9083a526a (patch)
tree66cf8aef286d14ad2ad46500ce081f6c7a227c09 /gdb
parent4f0420fdabda76f462bd29a02d9be575e0e0cce7 (diff)
downloadbinutils-gdb-6aa7d72401387cacc5a7699520045ce9083a526a.tar.gz
Remove regcache_invalidate
Remove regcache_invalidate, update callers to use detached_regcache::invalidate instead. gdb/ChangeLog: * regcache.h (regcache_invalidate): Remove, update callers to use detached_regcache::invalidate instead. * regcache.c (regcache_invalidate): Remove.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/record-full.c4
-rw-r--r--gdb/regcache.c9
-rw-r--r--gdb/regcache.h2
-rw-r--r--gdb/sh-tdep.c2
5 files changed, 10 insertions, 13 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d1ae322a107..d0cc45abad3 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
+ * regcache.h (regcache_invalidate): Remove, update callers to
+ use detached_regcache::invalidate instead.
+ * regcache.c (regcache_invalidate): Remove.
+
+2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
+
* regcache.h (regcache_raw_write_part): Remove, update callers
to use regcache::raw_write_part instead.
* regcache.c (regcache_raw_write_part): Remove.
diff --git a/gdb/record-full.c b/gdb/record-full.c
index b8460d9c5d8..8c0534e2291 100644
--- a/gdb/record-full.c
+++ b/gdb/record-full.c
@@ -1609,10 +1609,10 @@ record_full_target::store_registers (struct regcache *regcache, int regno)
for (i = 0;
i < gdbarch_num_regs (regcache->arch ());
i++)
- regcache_invalidate (regcache, i);
+ regcache->invalidate (i);
}
else
- regcache_invalidate (regcache, regno);
+ regcache->invalidate (regno);
error (_("Process record canceled the operation."));
}
diff --git a/gdb/regcache.c b/gdb/regcache.c
index 371322d9a1e..4dce9789a2b 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -238,7 +238,7 @@ public:
~regcache_invalidator ()
{
if (m_regcache != nullptr)
- regcache_invalidate (m_regcache, m_regnum);
+ m_regcache->invalidate (m_regnum);
}
DISABLE_COPY_AND_ASSIGN (regcache_invalidator);
@@ -329,13 +329,6 @@ reg_buffer::get_register_status (int regnum) const
}
void
-regcache_invalidate (struct regcache *regcache, int regnum)
-{
- gdb_assert (regcache != NULL);
- regcache->invalidate (regnum);
-}
-
-void
detached_regcache::invalidate (int regnum)
{
assert_regnum (regnum);
diff --git a/gdb/regcache.h b/gdb/regcache.h
index af3adf8d212..64e4cd7f094 100644
--- a/gdb/regcache.h
+++ b/gdb/regcache.h
@@ -50,8 +50,6 @@ extern void regcache_raw_write_unsigned (struct regcache *regcache,
extern LONGEST regcache_raw_get_signed (struct regcache *regcache,
int regnum);
-void regcache_invalidate (struct regcache *regcache, int regnum);
-
/* Transfer of pseudo-registers. The read variants return a register
status, as an indication of when a ``cooked'' register was
constructed from valid, invalid or unavailable ``raw''
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index 7946430ffd4..97e4a75ed70 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -1703,7 +1703,7 @@ sh_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
regcache->raw_write (BANK_REGNUM, buffer);
for (bregnum = R0_BANK0_REGNUM; bregnum < MACLB_REGNUM; ++bregnum)
- regcache_invalidate (regcache, bregnum);
+ regcache->invalidate (bregnum);
}
else if (reg_nr >= DR0_REGNUM && reg_nr <= DR_LAST_REGNUM)
{