diff options
author | Alan Hayward <alan.hayward@arm.com> | 2017-06-22 15:33:18 +0100 |
---|---|---|
committer | Alan Hayward <alan.hayward@arm.com> | 2017-06-22 15:33:18 +0100 |
commit | d7dcbefc724e59aa49e4ac2ac2337c8e1b8c367a (patch) | |
tree | 04372497d9cb94f3d5f922c3b35741e4dfea67f9 | |
parent | b30ff123fbff63d6c8be1115320efd0158e49a7f (diff) | |
download | gdb-d7dcbefc724e59aa49e4ac2ac2337c8e1b8c367a.zip gdb-d7dcbefc724e59aa49e4ac2ac2337c8e1b8c367a.tar.gz gdb-d7dcbefc724e59aa49e4ac2ac2337c8e1b8c367a.tar.bz2 |
Remove an instance of MAX_REGISTER_SIZE from record-full.c
gdb/
* record-full.c (record_full_exec_insn): Use byte_vector.
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/record-full.c | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e680925..1fad587 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2017-06-22 Alan Hayward <alan.hayward@arm.com> + + * record-full.c (record_full_exec_insn): Use byte_vector. + 2017-06-22 Yao Qi <yao.qi@linaro.org> * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated. diff --git a/gdb/record-full.c b/gdb/record-full.c index 31ff558..8e774a2 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 <signal.h> @@ -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; |