diff options
author | Andrew Cagney <cagney@redhat.com> | 2002-08-25 15:36:11 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2002-08-25 15:36:11 +0000 |
commit | bb4250135d4cfa8475d8ec740f76784323d2baa1 (patch) | |
tree | 38ebbb8a67aee816f712e662664ef48482878774 /gdb/regcache.h | |
parent | d0403e0050dd2e8a717d830ed3298cd8f9c3676a (diff) | |
download | gdb-bb4250135d4cfa8475d8ec740f76784323d2baa1.zip gdb-bb4250135d4cfa8475d8ec740f76784323d2baa1.tar.gz gdb-bb4250135d4cfa8475d8ec740f76784323d2baa1.tar.bz2 |
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.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gdb/regcache.h b/gdb/regcache.h index 6af729a..3c2dbeb 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. */ |