2002-08-25 Andrew Cagney <ac131313@redhat.com>
* regcache.c (max_register_size): New function. (init_legacy_regcache_descr): Ensure that max_register_size is large enough for REGISTER_VIRTUAL_SIZE. * regcache.h (max_register_size): Declare.
This commit is contained in:
parent
46d8b1c325
commit
0ed04cce6d
3 changed files with 25 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
|||
2002-08-25 Andrew Cagney <ac131313@redhat.com>
|
||||
|
||||
* regcache.c (max_register_size): New function.
|
||||
(init_legacy_regcache_descr): Ensure that max_register_size is
|
||||
large enough for REGISTER_VIRTUAL_SIZE.
|
||||
* regcache.h (max_register_size): Declare.
|
||||
|
||||
2002-08-24 Andrew Cagney <ac131313@redhat.com>
|
||||
|
||||
* rs6000-tdep.c (rs6000_gdbarch_init): Use deprecated version of
|
||||
|
|
|
@ -112,6 +112,8 @@ init_legacy_regcache_descr (struct gdbarch *gdbarch)
|
|||
descr->sizeof_register[i] = REGISTER_RAW_SIZE (i);
|
||||
if (descr->max_register_size < REGISTER_RAW_SIZE (i))
|
||||
descr->max_register_size = REGISTER_RAW_SIZE (i);
|
||||
if (descr->max_register_size < REGISTER_VIRTUAL_SIZE (i))
|
||||
descr->max_register_size = REGISTER_VIRTUAL_SIZE (i);
|
||||
}
|
||||
|
||||
/* Come up with the real size of the registers buffer. */
|
||||
|
@ -239,6 +241,16 @@ xfree_regcache_descr (struct gdbarch *gdbarch, void *ptr)
|
|||
xfree (descr);
|
||||
}
|
||||
|
||||
/* Utility functions returning useful register attributes stored in
|
||||
the regcache descr. */
|
||||
|
||||
int
|
||||
max_register_size (struct gdbarch *gdbarch)
|
||||
{
|
||||
struct regcache_descr *descr = regcache_descr (gdbarch);
|
||||
return descr->max_register_size;
|
||||
}
|
||||
|
||||
/* The register cache for storing raw register values. */
|
||||
|
||||
struct regcache
|
||||
|
|
|
@ -88,6 +88,12 @@ extern void supply_register (int regnum, const void *val);
|
|||
extern void regcache_collect (int regnum, void *buf);
|
||||
|
||||
|
||||
/* Return the size of the largest register. Used when allocating
|
||||
space for an aribtrary register value. */
|
||||
|
||||
extern int max_register_size (struct gdbarch *gdbarch);
|
||||
|
||||
|
||||
/* DEPRECATED: Character array containing an image of the inferior
|
||||
programs' registers for the most recently referenced thread. */
|
||||
|
||||
|
|
Loading…
Reference in a new issue