diff options
author | Andrew Cagney <cagney@redhat.com> | 2001-11-15 06:43:10 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2001-11-15 06:43:10 +0000 |
commit | a183a2ca0e8e21176deff41486a9c6a9220cdedb (patch) | |
tree | 4f44b031036e21a1c09d6d3d4ddaf0b66ef9e12d /gdb/regcache.c | |
parent | ad3e1601bdb0013dacad2c6347ab9b79c98b2417 (diff) | |
download | gdb-a183a2ca0e8e21176deff41486a9c6a9220cdedb.tar.gz |
* TODO (register_buffer): Delete.
* regcache.c (register_buffer): Make static.
(regcache_collect): New function.
* regcache.h (register_buffer): Delete declaration.
(regcache_collect): Declare.
* remote.c (store_register_using_P): Rewrite using
regcache_collect.
(remote_store_registers): Ditto.
* go32-nat.c (store_register): Ditto.
Diffstat (limited to 'gdb/regcache.c')
-rw-r--r-- | gdb/regcache.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gdb/regcache.c b/gdb/regcache.c index 3bf0b47b351..ae893454312 100644 --- a/gdb/regcache.c +++ b/gdb/regcache.c @@ -90,7 +90,7 @@ register_changed (int regnum) /* If REGNUM >= 0, return a pointer to register REGNUM's cache buffer area, else return a pointer to the start of the cache buffer. */ -char * +static char * register_buffer (int regnum) { if (regnum < 0) @@ -568,6 +568,13 @@ supply_register (int regnum, char *val) #endif } +void +regcache_collect (int regnum, void *buf) +{ + memcpy (buf, register_buffer (regnum), REGISTER_RAW_SIZE (regnum)); +} + + /* read_pc, write_pc, read_sp, write_sp, read_fp, write_fp, etc. Special handling for registers PC, SP, and FP. */ |