aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2024-11-08 10:00:14 +0100
committerTom de Vries <tdevries@suse.de>2024-11-08 10:00:14 +0100
commita452ed5b5c19dcfdd4999fd6cc6d82ce0e5b6b66 (patch)
treeb45dcbbdbba6dfb99ae8d968a43587027a2dd3d9
parent221d3ac93d820d8f6c4c57935b3d79936ea00aa8 (diff)
downloadgdb-a452ed5b5c19dcfdd4999fd6cc6d82ce0e5b6b66.zip
gdb-a452ed5b5c19dcfdd4999fd6cc6d82ce0e5b6b66.tar.gz
gdb-a452ed5b5c19dcfdd4999fd6cc6d82ce0e5b6b66.tar.bz2
[gdb/tdep] Use raw_supply_zeroed for NIOS r0 reg
Use reg_buffer::raw_supply_zeroed for NIOS register r0. Tested by rebuilding on x86_64-linux. Approved-By: Tom Tromey <tom@tromey.com>
-rw-r--r--gdb/nios2-linux-tdep.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/nios2-linux-tdep.c b/gdb/nios2-linux-tdep.c
index bd5f6cf..085e13c 100644
--- a/gdb/nios2-linux-tdep.c
+++ b/gdb/nios2-linux-tdep.c
@@ -61,7 +61,6 @@ nios2_supply_gregset (const struct regset *regset,
{
const gdb_byte *gregs = (const gdb_byte *) gregs_buf;
int regno;
- static const gdb_byte zero_buf[4] = {0, 0, 0, 0};
for (regno = NIOS2_Z_REGNUM; regno <= NIOS2_MPUACC_REGNUM; regno++)
if (regnum == -1 || regnum == regno)
@@ -69,7 +68,7 @@ nios2_supply_gregset (const struct regset *regset,
if (reg_offsets[regno] != -1)
regcache->raw_supply (regno, gregs + 4 * reg_offsets[regno]);
else
- regcache->raw_supply (regno, zero_buf);
+ regcache->raw_supply_zeroed (regno);
}
}