From: Alan Hayward Date: Fri, 24 Feb 2017 16:09:43 +0000 (+0000) Subject: Use I386_MAX_REGISTER_SIZE and M68K_MAX_REGISTER_SIZE X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=975c21ab6d2f6e94fcd4723bcaada4015ce7b0cf;p=binutils-gdb.git Use I386_MAX_REGISTER_SIZE and M68K_MAX_REGISTER_SIZE gdb/ * i386-tdep.c (i386_pseudo_register_read_into_value): Use I386_MAX_REGISTER_SIZE. (i386_pseudo_register_write): Likewise. (i386_process_record): Likewise. * i387-tdep.c (i387_supply_xsave): Likewise. * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE. (store_register): Likewise. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f4d70874037..321070467f3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,13 @@ +2017-02-24 Alan Hayward + + * i386-tdep.c (i386_pseudo_register_read_into_value): Use + I386_MAX_REGISTER_SIZE. + (i386_pseudo_register_write): Likewise. + (i386_process_record): Likewise. + * i387-tdep.c (i387_supply_xsave): Likewise. + * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE. + (store_register): Likewise. + 2017-02-23 Pedro Alves * ada-lang.c: Include "common/function-view.h". diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index f2917dbaed4..c81f3e05fd4 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -3271,7 +3271,7 @@ i386_pseudo_register_read_into_value (struct gdbarch *gdbarch, int regnum, struct value *result_value) { - gdb_byte raw_buf[MAX_REGISTER_SIZE]; + gdb_byte raw_buf[I386_MAX_REGISTER_SIZE]; enum register_status status; gdb_byte *buf = value_contents_raw (result_value); @@ -3476,7 +3476,7 @@ void i386_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int regnum, const gdb_byte *buf) { - gdb_byte raw_buf[MAX_REGISTER_SIZE]; + gdb_byte raw_buf[I386_MAX_REGISTER_SIZE]; if (i386_mmx_regnum_p (gdbarch, regnum)) { @@ -5060,7 +5060,7 @@ i386_process_record (struct gdbarch *gdbarch, struct regcache *regcache, uint32_t opcode; uint8_t opcode8; ULONGEST addr; - gdb_byte buf[MAX_REGISTER_SIZE]; + gdb_byte buf[I386_MAX_REGISTER_SIZE]; struct i386_record_s ir; struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); uint8_t rex_w = -1; diff --git a/gdb/i387-tdep.c b/gdb/i387-tdep.c index b0c48e4423b..c986e39ccdb 100644 --- a/gdb/i387-tdep.c +++ b/gdb/i387-tdep.c @@ -912,7 +912,7 @@ i387_supply_xsave (struct regcache *regcache, int regnum, const gdb_byte *regs = (const gdb_byte *) xsave; int i; ULONGEST clear_bv; - static const gdb_byte zero[MAX_REGISTER_SIZE] = { 0 }; + static const gdb_byte zero[I386_MAX_REGISTER_SIZE] = { 0 }; enum { none = 0x0, diff --git a/gdb/m68k-linux-nat.c b/gdb/m68k-linux-nat.c index 6944c74eb19..e5182caf391 100644 --- a/gdb/m68k-linux-nat.c +++ b/gdb/m68k-linux-nat.c @@ -105,7 +105,7 @@ fetch_register (struct regcache *regcache, int regno) struct gdbarch *gdbarch = get_regcache_arch (regcache); long regaddr, val; int i; - gdb_byte buf[MAX_REGISTER_SIZE]; + gdb_byte buf[M68K_MAX_REGISTER_SIZE]; int tid; /* Overload thread id onto process id. */ @@ -160,7 +160,7 @@ store_register (const struct regcache *regcache, int regno) long regaddr, val; int i; int tid; - gdb_byte buf[MAX_REGISTER_SIZE]; + gdb_byte buf[M68K_MAX_REGISTER_SIZE]; /* Overload thread id onto process id. */ tid = ptid_get_lwp (inferior_ptid);