diff options
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/mips-linux-nat.c | 8 |
2 files changed, 12 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1d42c30..8035353 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2018-05-15 Maciej W. Rozycki <macro@mips.com> + * mips-linux-nat.c (mips_linux_nat_target::fetch_registers): + Supply the MIPS_ZERO_REGNUM register. + +2018-05-15 Maciej W. Rozycki <macro@mips.com> + * mips-tdep.c (mask_address_var): Make variable static. 2018-05-14 Tom Tromey <tom@tromey.com> diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c index 4e0c51b..b1dbb79 100644 --- a/gdb/mips-linux-nat.c +++ b/gdb/mips-linux-nat.c @@ -416,7 +416,13 @@ mips_linux_nat_target::fetch_registers (struct regcache *regcache, int regnum) /* If we know, or just found out, that PTRACE_GETREGS does not work, fall back to PTRACE_PEEKUSER. */ if (!have_ptrace_regsets) - linux_nat_trad_target::fetch_registers (regcache, regnum); + { + linux_nat_trad_target::fetch_registers (regcache, regnum); + + /* Fill the inaccessible zero register with zero. */ + if (regnum == MIPS_ZERO_REGNUM || regnum == -1) + regcache->raw_supply_zeroed (MIPS_ZERO_REGNUM); + } } /* Store REGNO (or all registers if REGNO == -1) to the target |