From: Alan Hayward Date: Thu, 22 Jun 2017 14:33:18 +0000 (+0100) Subject: Remove an instance of MAX_REGISTER_SIZE from record-full.c X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d7dcbefc724e59aa49e4ac2ac2337c8e1b8c367a;p=binutils-gdb.git Remove an instance of MAX_REGISTER_SIZE from record-full.c gdb/ * record-full.c (record_full_exec_insn): Use byte_vector. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e6809259981..1fad587c74b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2017-06-22 Alan Hayward + + * record-full.c (record_full_exec_insn): Use byte_vector. + 2017-06-22 Yao Qi * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated. diff --git a/gdb/record-full.c b/gdb/record-full.c index 31ff558d2a6..8e774a22711 100644 --- a/gdb/record-full.c +++ b/gdb/record-full.c @@ -36,6 +36,7 @@ #include "observer.h" #include "infrun.h" #include "common/gdb_unlinker.h" +#include "common/byte-vector.h" #include @@ -698,7 +699,7 @@ record_full_exec_insn (struct regcache *regcache, { case record_full_reg: /* reg */ { - gdb_byte reg[MAX_REGISTER_SIZE]; + gdb::byte_vector reg (entry->u.reg.len); if (record_debug > 1) fprintf_unfiltered (gdb_stdlog, @@ -707,10 +708,10 @@ record_full_exec_insn (struct regcache *regcache, host_address_to_string (entry), entry->u.reg.num); - regcache_cooked_read (regcache, entry->u.reg.num, reg); + regcache_cooked_read (regcache, entry->u.reg.num, reg.data ()); regcache_cooked_write (regcache, entry->u.reg.num, record_full_get_loc (entry)); - memcpy (record_full_get_loc (entry), reg, entry->u.reg.len); + memcpy (record_full_get_loc (entry), reg.data (), entry->u.reg.len); } break;