This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] $a0 stored as a DSP register on mips64
- From: "Liu, Lei" <lei dot liu2 at windriver dot com>
- To: <gdb-patches at sourceware dot org>
- Date: Mon, 10 Dec 2012 16:29:03 +0800
- Subject: [PATCH] $a0 stored as a DSP register on mips64
Hi,
Register $a0 on mips64 is now stored as a DSP register if dspacc == -1,
as the regno 4 lies between dspacc and dspacc+6. This causes $a0 can't
be correctly set with PTRACE_SETREGS. We should not check regno against
DSP registers if HAVE_DSP is not set, just like what we did in
mips64_linux_regsets_fetch_registers.
Lei
2012-12-10 Lei Liu <lei.liu2@windriver.com>
* mips-linux-nat.c (mips64_linux_regsets_store_registers):
Don't check DSP register number if HAVE_DSP is not set.
---
gdb/mips-linux-nat.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
index bfcd061..10e14c6 100644
--- a/gdb/mips-linux-nat.c
+++ b/gdb/mips-linux-nat.c
@@ -326,7 +326,7 @@ mips64_linux_regsets_store_registers (struct target_ops *ops,
have_dsp = mips_regnum (gdbarch)->dspctl != -1;
if (!have_dsp)
is_dsp = 0;
- if (regno >= mips_regnum (gdbarch)->dspacc
+ else if (regno >= mips_regnum (gdbarch)->dspacc
&& regno < mips_regnum (gdbarch)->dspacc + 6)
is_dsp = 1;
else if (regno == mips_regnum (gdbarch)->dspctl)
--
1.6.3.3