aboutsummaryrefslogtreecommitdiff
path: root/gdb/regcache.h
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2017-07-18 12:46:14 +0100
committerYao Qi <yao.qi@linaro.org>2017-07-18 12:46:14 +0100
commitcfb7e58b483faa7ca4a3a8bb0030ed3e990b2c5c (patch)
tree57310cba2c726033617ff662ebbd25e7a096e527 /gdb/regcache.h
parentc646b4e87f4b3445f83d48fa7d85999dd702c50f (diff)
downloadgdb-cfb7e58b483faa7ca4a3a8bb0030ed3e990b2c5c.zip
gdb-cfb7e58b483faa7ca4a3a8bb0030ed3e990b2c5c.tar.gz
gdb-cfb7e58b483faa7ca4a3a8bb0030ed3e990b2c5c.tar.bz2
Simplify regcache_cpy and remove regcache::cpy_no_passthrough
Nowadays, regcache_cpy is used where src is read-only and dst is not read-only, so the regcache_cpy can be simplified to handle this case only. As a result, regcache::cpy_no_passthrough, which is about two read-only regcache copy, is no longer used, remove it as well. gdb: 2017-07-18 Yao Qi <yao.qi@linaro.org> * regcache.c (regcache_cpy): Simplify it. (regcache::cpy_no_passthrough): Remove it. * regcache.h (cpy_no_passthrough): Remove it. (regcache_dup, regcache_cpy): Update comments.
Diffstat (limited to 'gdb/regcache.h')
-rw-r--r--gdb/regcache.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/gdb/regcache.h b/gdb/regcache.h
index b416d5e..aa64a00 100644
--- a/gdb/regcache.h
+++ b/gdb/regcache.h
@@ -369,8 +369,6 @@ private:
void restore (struct regcache *src);
- void cpy_no_passthrough (struct regcache *src);
-
enum register_status xfer_part (int regnum, int offset, int len, void *in,
const void *out,
decltype (regcache_raw_read) read,
@@ -415,13 +413,12 @@ private:
regcache_cpy (struct regcache *dst, struct regcache *src);
};
-/* Copy/duplicate the contents of a register cache. By default, the
- operation is pass-through. Writes to DST and reads from SRC will
- go through to the target. See also regcache_cpy_no_passthrough.
-
- regcache_cpy can not have overlapping SRC and DST buffers. */
-
+/* Duplicate the contents of a register cache to a read-only register
+ cache. The operation is pass-through. */
extern struct regcache *regcache_dup (struct regcache *regcache);
+
+/* Writes to DEST will go through to the target. SRC is a read-only
+ register cache. */
extern void regcache_cpy (struct regcache *dest, struct regcache *src);
extern void registers_changed (void);