summaryrefslogtreecommitdiff
path: root/gdb/sparc-nat.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2011-05-21 19:19:45 +0000
committerMark Kettenis <kettenis@gnu.org>2011-05-21 19:19:45 +0000
commit22e74ef9b59080f4cf880185ec09c483952eb74f (patch)
treee0a093b1eb13b08b7f5e5c213aee58bcf4ea00fe /gdb/sparc-nat.c
parentb71457c579b2c672a88c35a3886a2704ab52ad4e (diff)
* 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.
Diffstat (limited to 'gdb/sparc-nat.c')
-rw-r--r--gdb/sparc-nat.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/sparc-nat.c b/gdb/sparc-nat.c
index 60d2989e4e..3d936fcc8f 100644
--- a/gdb/sparc-nat.c
+++ b/gdb/sparc-nat.c
@@ -159,7 +159,9 @@ sparc_fetch_inferior_registers (struct target_ops *ops,
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;
}