diff options
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/ia64-linux-nat.c | 10 |
2 files changed, 15 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0fb6602..0b3f886 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2012-03-28 Joel Brobecker <brobecker@adacore.com> + + * ia64-linux-nat.c (ia64_linux_fetch_register): Add special + handling for r0. + 2012-03-27 Pedro Alves <palves@redhat.com> Eliminate struct ui_stream. diff --git a/gdb/ia64-linux-nat.c b/gdb/ia64-linux-nat.c index 19b827f..60b873b 100644 --- a/gdb/ia64-linux-nat.c +++ b/gdb/ia64-linux-nat.c @@ -680,6 +680,16 @@ ia64_linux_fetch_register (struct regcache *regcache, int regnum) PTRACE_TYPE_RET *buf; int pid, i; + /* r0 cannot be fetched but is always zero. */ + if (regnum == IA64_GR0_REGNUM) + { + const gdb_byte zero[8] = { 0 }; + + gdb_assert (sizeof (zero) == register_size (gdbarch, regnum)); + regcache_raw_supply (regcache, regnum, zero); + return; + } + if (ia64_cannot_fetch_register (gdbarch, regnum)) { regcache_raw_supply (regcache, regnum, NULL); |