summaryrefslogtreecommitdiff
path: root/gdb/regcache.h
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-08-25 15:36:11 +0000
committerAndrew Cagney <cagney@redhat.com>2002-08-25 15:36:11 +0000
commit0f9aeff6a6e4e5f2dd88e50f2cf5ed1712ebba40 (patch)
treeb6c892a9497026f0954a357bed759d068252ece0 /gdb/regcache.h
parent99ac314fc1fc975ddad4208a9355abde8131adde (diff)
downloadgdb-0f9aeff6a6e4e5f2dd88e50f2cf5ed1712ebba40.tar.gz
2002-08-25 Andrew Cagney <ac131313@redhat.com>
* regcache.c (struct regcache_descr): Add field register_type. (init_legacy_regcache_descr): Pass a pre-allocated regcache_descr in as a parameter (init_regcache_descr): Initialize register_type. Pass the descr to init_legacy_regcache_descr. Use register_type instead of REGISTER_VIRTUAL_TYPE. (register_type): New function. (regcache_dump): Replace REGISTER_VIRTUAL_TYPE with register_type. * regcache.h (register_type): Declare.
Diffstat (limited to 'gdb/regcache.h')
-rw-r--r--gdb/regcache.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/gdb/regcache.h b/gdb/regcache.h
index 6af729a40ff..3c2dbebecb1 100644
--- a/gdb/regcache.h
+++ b/gdb/regcache.h
@@ -88,6 +88,25 @@ extern void supply_register (int regnum, const void *val);
extern void regcache_collect (int regnum, 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.
+
+ NOTE: cagney/2002-08-17: The original macro was called
+ REGISTER_VIRTUAL_TYPE. This was because the register could have
+ different raw and cooked (nee virtual) representations. The
+ CONVERTABLE methods being used to convert between the two
+ representations. Current code does not do this. Instead, the
+ first [0..NUM_REGS) registers are 1:1 raw:cooked, and the type
+ exactly describes the register's representation. Consequently, the
+ ``virtual'' has been dropped.
+
+ FIXME: cagney/2002-08-17: A number of architectures, including the
+ MIPS, are currently broken in this regard. */
+
+extern struct type *register_type (struct gdbarch *gdbarch, int regnum);
+
+
/* Return the size of the largest register. Used when allocating
space for an aribtrary register value. */