aboutsummaryrefslogtreecommitdiff
path: root/gdbsupport/common-regcache.h
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2024-11-12 11:37:50 +0100
committerTom de Vries <tdevries@suse.de>2024-11-12 11:37:50 +0100
commita4a5f05266b69ebe8172433217d47cc7a737e51d (patch)
tree6d9411eb6ea8c52aa4c2f67bb6bc5033693a6c7c /gdbsupport/common-regcache.h
parent510fa4aadb1c6509ebbbe55b901231c45039efd8 (diff)
downloadbinutils-a4a5f05266b69ebe8172433217d47cc7a737e51d.zip
binutils-a4a5f05266b69ebe8172433217d47cc7a737e51d.tar.gz
binutils-a4a5f05266b69ebe8172433217d47cc7a737e51d.tar.bz2
[gdb/tdep] Use raw_supply_part_zeroed for AArch64
In gdb/aarch64-linux-tdep.c we find: ... gdb::byte_vector za_zeroed (za_bytes, 0); regcache->raw_supply (tdep->sme_za_regnum, za_zeroed); ... We can't use reg_buffer::raw_supply_zeroed here because only part of the register is written. Add raw_supply_part_zeroed, and use it instead. Likewise elsewhere in AArch64 tdep code. Tested on aarch64-linux. Approved-By: Luis Machado <luis.machado@arm.com>
Diffstat (limited to 'gdbsupport/common-regcache.h')
-rw-r--r--gdbsupport/common-regcache.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdbsupport/common-regcache.h b/gdbsupport/common-regcache.h
index f8704c1..ef37d61 100644
--- a/gdbsupport/common-regcache.h
+++ b/gdbsupport/common-regcache.h
@@ -96,6 +96,12 @@ struct reg_buffer_common
regcache_register_size (this, regnum)));
}
+ /* Supply part of register REGNUM with zeroed value. Start at OFFSET in
+ the register, with size SIZE. The rest of the register is left
+ untouched. */
+ virtual void raw_supply_part_zeroed (int regnum, int offset, size_t size)
+ = 0;
+
/* Collect register REGNUM from this register buffer and store its contents in
DST. */
virtual void raw_collect (int regnum, gdb::array_view<gdb_byte> dst) const