aboutsummaryrefslogtreecommitdiff
path: root/gdb/regcache.h
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-08-25 18:47:16 +0000
committerAndrew Cagney <cagney@redhat.com>2002-08-25 18:47:16 +0000
commitd3b22ed57cf5e17e4172752a17f61a719bf9103a (patch)
tree05bc81ffda8d77748be7d300c319ac10c3c7b5ae /gdb/regcache.h
parent90949d06a32b215ed910106ac175f56f531cfecf (diff)
downloadfsf-binutils-gdb-d3b22ed57cf5e17e4172752a17f61a719bf9103a.zip
fsf-binutils-gdb-d3b22ed57cf5e17e4172752a17f61a719bf9103a.tar.gz
fsf-binutils-gdb-d3b22ed57cf5e17e4172752a17f61a719bf9103a.tar.bz2
2002-08-25 Andrew Cagney <ac131313@redhat.com>
* regcache.h (register_offset_hack): Declare. (regcache_cooked_read_using_offset_hack): Declare. (regcache_cooked_write_using_offset_hack): Declare. * regcache.c (register_offset_hack): New function. (regcache_cooked_read_using_offset_hack): New function. (regcache_cooked_write_using_offset_hack): New function. (regcache_dump): Check that the registers, according to their offset, are packed hard against each other. (cooked_xfer_using_offset_hack): New function.
Diffstat (limited to 'gdb/regcache.h')
-rw-r--r--gdb/regcache.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/gdb/regcache.h b/gdb/regcache.h
index 3c2dbeb..1db42e3 100644
--- a/gdb/regcache.h
+++ b/gdb/regcache.h
@@ -88,6 +88,33 @@ extern void supply_register (int regnum, const void *val);
extern void regcache_collect (int regnum, void *buf);
+/* The register's ``offset''.
+
+ NOTE: cagney/2002-08-17: The ``struct value'' and expression
+ evaluator treat the register cache as a large liner buffer.
+ Instead of reading/writing a register using its register number,
+ the code read/writes registers by specifying their offset into the
+ buffer and a number of bytes. The code also assumes that these
+ byte read/writes can cross register boundaries, adjacent registers
+ treated as a contiguous set of bytes.
+
+ The below map that model onto the real register cache. New code
+ should go out of their way to avoid using these interfaces.
+
+ FIXME: cagney/2002-08-17: The ``struct value'' and expression
+ evaluator should be fixed. Instead of using the { offset, length }
+ pair to describe a value within one or more registers, the code
+ should use a chain of { regnum, offset, len } tripples. */
+
+extern int register_offset_hack (struct gdbarch *gdbarch, int regnum);
+extern void regcache_cooked_read_using_offset_hack (struct regcache *regcache,
+ int offset, int len,
+ void *buf);
+extern void regcache_cooked_write_using_offset_hack (struct regcache *regcache,
+ int offset, int len,
+ const void *buf);
+
+
/* The type of a register. This function is slightly more efficient
then its gdbarch vector counterpart since it returns a precomputed
value stored in a table.