+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.
+
2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
Split real and pseudo registers.
struct regcache *regcache,
int regnum)
{
- gdb_byte raw_buf[MAX_REGISTER_SIZE];
+ gdb_byte *raw_buf = (gdb_byte *) alloca (register_size (gdbarch, regnum));
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
enum register_status status;
struct value *result_value;
struct regcache *regcache,
int regnum, const gdb_byte *buf)
{
- gdb_byte raw_buf[MAX_REGISTER_SIZE];
+ gdb_byte *raw_buf = (gdb_byte *) alloca (register_size (gdbarch, regnum));
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
if (i386_byte_regnum_p (gdbarch, regnum))
const gdb_byte *buf))
{
struct regcache_descr *descr = regcache->descr;
- gdb_byte reg[MAX_REGISTER_SIZE];
+ struct gdbarch *gdbarch = get_regcache_arch (regcache);
+ gdb_byte *reg = (gdb_byte *) alloca (register_size (gdbarch, regnum));
gdb_assert (offset >= 0 && offset <= descr->sizeof_register[regnum]);
gdb_assert (len >= 0 && offset + len <= descr->sizeof_register[regnum]);
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)
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)