Use I386_MAX_REGISTER_SIZE and M68K_MAX_REGISTER_SIZE
authorAlan Hayward <alan.hayward@arm.com>
Fri, 24 Feb 2017 16:09:43 +0000 (16:09 +0000)
committerAlan Hayward <alan.hayward@arm.com>
Fri, 24 Feb 2017 16:09:43 +0000 (16:09 +0000)
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.

gdb/ChangeLog
gdb/i386-tdep.c
gdb/i387-tdep.c
gdb/m68k-linux-nat.c

index f4d7087..3210704 100644 (file)
@@ -1,3 +1,13 @@
+2017-02-24  Alan Hayward  <alan.hayward@arm.com>
+
+       * 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  <palves@redhat.com>
 
        * ada-lang.c: Include "common/function-view.h".
index f2917db..c81f3e0 100644 (file)
@@ -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;
index b0c48e4..c986e39 100644 (file)
@@ -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,
index 6944c74..e5182ca 100644 (file)
@@ -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);