Use register_size () instead of MAX_REGISTER_SIZE
2017-01-18 Alan Hayward <alan.hayward@arm.com> * amd64-tdep.c (amd64_pseudo_register_read_value): remove MAX_REGISTER_SIZE. (amd64_pseudo_register_read_value): Likewise. * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE. (store_register_using_P): Likewise. * regcache.c (regcache_xfer_part): Likewise.
This commit is contained in:
parent
2cedb9ebf8
commit
9890e4338d
4 changed files with 16 additions and 5 deletions
|
@ -7467,9 +7467,10 @@ remote_wait (struct target_ops *ops,
|
|||
static int
|
||||
fetch_register_using_p (struct regcache *regcache, struct packet_reg *reg)
|
||||
{
|
||||
struct gdbarch *gdbarch = get_regcache_arch (regcache);
|
||||
struct remote_state *rs = get_remote_state ();
|
||||
char *buf, *p;
|
||||
char regp[MAX_REGISTER_SIZE];
|
||||
gdb_byte *regp = (gdb_byte *) alloca (register_size (gdbarch, reg->regnum));
|
||||
int i;
|
||||
|
||||
if (packet_support (PACKET_p) == PACKET_DISABLE)
|
||||
|
@ -7774,7 +7775,7 @@ store_register_using_P (const struct regcache *regcache,
|
|||
struct remote_state *rs = get_remote_state ();
|
||||
/* Try storing a single register. */
|
||||
char *buf = rs->buf;
|
||||
gdb_byte regp[MAX_REGISTER_SIZE];
|
||||
gdb_byte *regp = (gdb_byte *) alloca (register_size (gdbarch, reg->regnum));
|
||||
char *p;
|
||||
|
||||
if (packet_support (PACKET_P) == PACKET_DISABLE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue