summaryrefslogtreecommitdiff
path: root/gdb/cris-tdep.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2020-01-13 18:12:08 -0500
committerSimon Marchi <simon.marchi@efficios.com>2020-01-13 18:12:08 -0500
commit0cac9354bfb07a5cf53d70dbefaa35c6afa7da0a (patch)
tree92db38d9e027bd2eea944586d3f1aed2aa10472d /gdb/cris-tdep.c
parent9a6d629ccf328e3f041c3fcb7e91f49a5d72d0fb (diff)
downloadbinutils-gdb-0cac9354bfb07a5cf53d70dbefaa35c6afa7da0a.tar.gz
gdb: use gdb::byte_vector instead of std::vector<char> in core_target::get_core_register_section
Since the data held by the `contents` variable is arbitrary binary data, it should have gdb_byte elements, not char elements. Also, using gdb::byte_vector is preferable, since it doesn't unnecessarily zero-initialize the values. Instead of adding a cast in the call to m_core_vec->core_read_registers, I have changed core_read_registers' argument to be a gdb_byte* instead of a char*. gdb/ChangeLog: * gdbcore.h (struct core_fns) <core_read_registers>: Change core_reg_sect type to gdb_byte *. * arm-nbsd-nat.c (fetch_elfcore_registers): Likewise. * cris-tdep.c (fetch_core_registers): Likewise. * corelow.c (core_target::get_core_register_section): Change type of `contents` to gdb::byte_vector.
Diffstat (limited to 'gdb/cris-tdep.c')
-rw-r--r--gdb/cris-tdep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index 22b4db917ca..6885d237f3a 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -3793,7 +3793,7 @@ cris_supply_gregset (struct regcache *regcache, cris_elf_gregset_t *gregsetp)
static void
fetch_core_registers (struct regcache *regcache,
- char *core_reg_sect, unsigned core_reg_size,
+ gdb_byte *core_reg_sect, unsigned core_reg_size,
int which, CORE_ADDR reg_addr)
{
cris_elf_gregset_t gregset;