From a452ed5b5c19dcfdd4999fd6cc6d82ce0e5b6b66 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Fri, 8 Nov 2024 10:00:14 +0100 Subject: [PATCH] [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 --- gdb/nios2-linux-tdep.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gdb/nios2-linux-tdep.c b/gdb/nios2-linux-tdep.c index bd5f6cfe3f6..085e13ce126 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); } }