zero as the value for %g0 in the register cache.
* sparc-tdep.c (sparc32_supply_gregset): Likewise.
* sparc64-tdep.c (sparc64_supply_gregset): Likewise.
+2011-05-21 Mark Kettenis <kettenis@gnu.org>
+
+ * 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.
+
2011-05-20 Pedro Alves <pedro@codesourcery.com>
* infrun.c (proceed): Set previous_inferior_ptid here.
if (regnum == SPARC_G0_REGNUM)
{
- regcache_raw_supply (regcache, SPARC_G0_REGNUM, NULL);
+ gdb_byte zero[8] = { 0 };
+
+ regcache_raw_supply (regcache, SPARC_G0_REGNUM, &zero);
return;
}
int regnum, const void *gregs)
{
const gdb_byte *regs = gregs;
+ gdb_byte zero[4] = { 0 };
int i;
if (regnum == SPARC32_PSR_REGNUM || regnum == -1)
regs + gregset->r_y_offset);
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)
{
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)
}
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)
{