]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2011-05-26 Pedro Alves <pedro@codesourcery.com>
authorPedro Alves <palves@redhat.com>
Thu, 26 May 2011 14:14:55 +0000 (14:14 +0000)
committerPedro Alves <palves@redhat.com>
Thu, 26 May 2011 14:14:55 +0000 (14:14 +0000)
* alpha-tdep.c (alpha_cannot_fetch_register): Don't return true
for ALPHA_ZERO_REGNUM.
(alpha_supply_int_regs): Explicitly supply zero as the value for
ALPHA_ZERO_REGNUM in the register cache.
* alpha-nat.c (fetch_osf_core_registers): Ditto.

gdb/ChangeLog
gdb/alpha-nat.c
gdb/alpha-tdep.c

index 9ffd36603054be188f2ab0866bec2dff121b0d23..64dc47b79919df5c24e8a0542670d4b4c74ea603 100644 (file)
@@ -1,3 +1,11 @@
+2011-05-26  Pedro Alves  <pedro@codesourcery.com>
+
+       * alpha-tdep.c (alpha_cannot_fetch_register): Don't return true
+       for ALPHA_ZERO_REGNUM.
+       (alpha_supply_int_regs): Explicitly supply zero as the value for
+       ALPHA_ZERO_REGNUM in the register cache.
+       * alpha-nat.c (fetch_osf_core_registers): Ditto.
+
 2011-05-24  Pedro Alves  <pedro@codesourcery.com>
 
        * solib-svr4.c (svr4_solib_create_inferior_hook): Skip setting
index 1a55ea9dacee9d7f30275201d7eeacfcfc27edf9..f548359c693b300b555bf2965348c3244c1d33a4 100644 (file)
@@ -101,6 +101,15 @@ fetch_osf_core_registers (struct regcache *regcache,
          regcache_raw_supply (regcache, regno, NULL);
          continue;
        }
+
+      if (regno == ALPHA_ZERO_REGNUM)
+       {
+         const gdb_byte zero[8] = { 0 };
+
+         regcache_raw_supply (regcache, regno, zero);
+         continue;
+       }
+
       addr = 8 * core_reg_mapping[regno];
       if (addr < 0 || addr >= core_reg_size)
        {
index 51eb6e431d1e2d215e4dc148613688945fd5c688..83c283c032c765c4b117c5341156dec18e135395 100644 (file)
@@ -111,8 +111,7 @@ alpha_register_name (struct gdbarch *gdbarch, int regno)
 static int
 alpha_cannot_fetch_register (struct gdbarch *gdbarch, int regno)
 {
-  return (regno == ALPHA_ZERO_REGNUM
-          || strlen (alpha_register_name (gdbarch, regno)) == 0);
+  return (strlen (alpha_register_name (gdbarch, regno)) == 0);
 }
 
 static int
@@ -1424,7 +1423,11 @@ alpha_supply_int_regs (struct regcache *regcache, int regno,
       regcache_raw_supply (regcache, i, regs + i * 8);
 
   if (regno == ALPHA_ZERO_REGNUM || regno == -1)
-    regcache_raw_supply (regcache, ALPHA_ZERO_REGNUM, NULL);
+    {
+      const gdb_byte zero[8] = { 0 };
+
+      regcache_raw_supply (regcache, ALPHA_ZERO_REGNUM, zero);
+    }
 
   if (regno == ALPHA_PC_REGNUM || regno == -1)
     regcache_raw_supply (regcache, ALPHA_PC_REGNUM, pc);