diff options
author | Pedro Alves <palves@redhat.com> | 2011-05-26 13:57:46 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2011-05-26 13:57:46 +0000 |
commit | 4a1be8d214b23357f5f2aed974727e83edc0b50e (patch) | |
tree | ce084f43314864aadd706805ddb3fa88417a7e83 /gdb/alpha-tdep.c | |
parent | 6769d5017ff78562047c02b1efbe8743c9368800 (diff) | |
download | gdb-4a1be8d214b23357f5f2aed974727e83edc0b50e.zip gdb-4a1be8d214b23357f5f2aed974727e83edc0b50e.tar.gz gdb-4a1be8d214b23357f5f2aed974727e83edc0b50e.tar.bz2 |
* 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.
Diffstat (limited to 'gdb/alpha-tdep.c')
-rw-r--r-- | gdb/alpha-tdep.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c index 10e753b..77782e8 100644 --- a/gdb/alpha-tdep.c +++ b/gdb/alpha-tdep.c @@ -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); |