This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]