mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-23 01:53:38 +08:00
[gdb/tdep] Use raw_supply_zeroed for PA-RISC r0 reg
Use reg_buffer::raw_supply_zeroed for PA-RISC register r0. Tested by rebuilding on x86_64-linux. Approved-By: Tom Tromey <tom@tromey.com>
This commit is contained in:
parent
e08e0b3e78
commit
a2578d52bd
@ -55,11 +55,10 @@ hppaobsd_fpregset_supplies_p (int regnum)
|
||||
static void
|
||||
hppaobsd_supply_gregset (struct regcache *regcache, const void *gregs)
|
||||
{
|
||||
gdb_byte zero[4] = { 0 };
|
||||
const char *regs = gregs;
|
||||
int regnum;
|
||||
|
||||
regcache->raw_supply (HPPA_R0_REGNUM, &zero);
|
||||
regcache->raw_supply_zeroed (HPPA_R0_REGNUM);
|
||||
for (regnum = HPPA_R1_REGNUM; regnum <= HPPA_R31_REGNUM; regnum++)
|
||||
regcache->raw_supply (regnum, regs + regnum * 4);
|
||||
|
||||
|
@ -43,7 +43,6 @@ hppaobsd_supply_gregset (const struct regset *regset,
|
||||
struct regcache *regcache,
|
||||
int regnum, const void *gregs, size_t len)
|
||||
{
|
||||
gdb_byte zero[4] = { 0 };
|
||||
const gdb_byte *regs = (const gdb_byte *) gregs;
|
||||
size_t offset;
|
||||
int i;
|
||||
@ -51,7 +50,7 @@ hppaobsd_supply_gregset (const struct regset *regset,
|
||||
gdb_assert (len >= HPPAOBSD_SIZEOF_GREGS);
|
||||
|
||||
if (regnum == -1 || regnum == HPPA_R0_REGNUM)
|
||||
regcache->raw_supply (HPPA_R0_REGNUM, &zero);
|
||||
regcache->raw_supply_zeroed (HPPA_R0_REGNUM);
|
||||
for (i = HPPA_R1_REGNUM, offset = 4; i <= HPPA_R31_REGNUM; i++, offset += 4)
|
||||
{
|
||||
if (regnum == -1 || regnum == i)
|
||||
|
Loading…
Reference in New Issue
Block a user