2012-07-18 Sergio Durigan Junior <sergiodj@redhat.com>
[external/binutils.git] / gdb / sparc-nat.c
index 57c0755..cf36abd 100644 (file)
@@ -1,7 +1,6 @@
 /* Native-dependent code for SPARC.
 
-   Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009
-   Free Software Foundation, Inc.
+   Copyright (C) 2003-2005, 2007-2012 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -159,7 +158,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;
     }
 
@@ -254,7 +255,7 @@ sparc_store_inferior_registers (struct target_ops *ops,
 \f
 /* Fetch StackGhost Per-Process XOR cookie.  */
 
-LONGEST
+static LONGEST
 sparc_xfer_wcookie (struct target_ops *ops, enum target_object object,
                    const char *annex, gdb_byte *readbuf,
                    const gdb_byte *writebuf, ULONGEST offset, LONGEST len)