+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-26 Yao Qi <yao@codesourcery.com>
* gdb/gdb_thread_db.h: Remove HAVE_UINTPTR_T.
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)
{
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
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);