aboutsummaryrefslogtreecommitdiff
path: root/gdb/mips-linux-nat.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/mips-linux-nat.c')
-rw-r--r--gdb/mips-linux-nat.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
index b1dbb79..a9f0b79 100644
--- a/gdb/mips-linux-nat.c
+++ b/gdb/mips-linux-nat.c
@@ -145,6 +145,11 @@ mips64_linux_register_addr (struct gdbarch *gdbarch, int regno, int store)
if (regno < 0 || regno >= gdbarch_num_regs (gdbarch))
error (_("Bogon register number %d."), regno);
+ /* On n32 we can't access 64-bit registers via PTRACE_PEEKUSR
+ or PTRACE_POKEUSR. */
+ if (register_size (gdbarch, regno) > sizeof (PTRACE_TYPE_RET))
+ return (CORE_ADDR) -1;
+
if (regno > MIPS_ZERO_REGNUM && regno < MIPS_ZERO_REGNUM + 32)
regaddr = regno;
else if ((regno >= mips_regnum (gdbarch)->fp0)