* sparc-nat.c (sparc_fetch_inferior_registers): Explicitly supply
zero as the value for %g0 in the register cache. * sparc-tdep.c (sparc32_supply_gregset): Likewise. * sparc64-tdep.c (sparc64_supply_gregset): Likewise.
This commit is contained in:
parent
b71457c579
commit
22e74ef9b5
4 changed files with 14 additions and 3 deletions
|
@ -1206,6 +1206,7 @@ sparc64_supply_gregset (const struct sparc_gregset *gregset,
|
|||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
int sparc32 = (gdbarch_ptr_bit (gdbarch) == 32);
|
||||
const gdb_byte *regs = gregs;
|
||||
gdb_byte zero[8] = { 0 };
|
||||
int i;
|
||||
|
||||
if (sparc32)
|
||||
|
@ -1268,7 +1269,7 @@ sparc64_supply_gregset (const struct sparc_gregset *gregset,
|
|||
}
|
||||
|
||||
if (regnum == SPARC_G0_REGNUM || regnum == -1)
|
||||
regcache_raw_supply (regcache, SPARC_G0_REGNUM, NULL);
|
||||
regcache_raw_supply (regcache, SPARC_G0_REGNUM, &zero);
|
||||
|
||||
if ((regnum >= SPARC_G1_REGNUM && regnum <= SPARC_O7_REGNUM) || regnum == -1)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue