This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] MIPS: Go back with the default Linux # of registers to 90
- From: Maciej W.Rozycki <macro at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 22 Apr 2016 00:24:30 -0000
- Subject: [binutils-gdb] MIPS: Go back with the default Linux # of registers to 90
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=3877922e56a9e44fed0ca72e64cad7578e6b1ed5
commit 3877922e56a9e44fed0ca72e64cad7578e6b1ed5
Author: Maciej W. Rozycki <macro@imgtec.com>
Date: Mon Apr 18 14:17:18 2016 +0100
MIPS: Go back with the default Linux # of registers to 90
Set the number of registers for non-XML-described Linux targets to 90,
reverting a change made here with the addition of DSP register support:
commit 1faeff088bbbd037d7769d214378b4faf805fa2e
Author: Maciej W. Rozycki <macro@linux-mips.org>
Date: Thu Mar 1 22:19:48 2012 +0000
and fixing a regression introduced for legacy `gdbserver' targets
causing a "Remote 'g' packet reply is too long" error message where the
amount of register data received with a `g' packet (90) exceeds the
maximum number of registers expected (79).
Update the setting for XML-described targets, reflecting the actual
number of registers which have been assigned numbers, matching the:
gdb_assert (gdbarch_num_regs (gdbarch) <= MIPS_RESTART_REGNUM);
requirement in `mips_linux_init_abi'.
gdb/
* mips-tdep.c (mips_gdbarch_init): For GDB_OSABI_LINUX set
`num_regs' to 90 rather than 79. Where a target description is
present adjust the setting appropriately.
Diff:
---
gdb/ChangeLog | 6 ++++++
gdb/mips-tdep.c | 6 +++++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b6282e6..d46984f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2016-04-22 Maciej W. Rozycki <macro@imgtec.com>
+
+ * mips-tdep.c (mips_gdbarch_init): For GDB_OSABI_LINUX set
+ `num_regs' to 90 rather than 79. Where a target description is
+ present adjust the setting appropriately.
+
2016-04-21 Pedro Alves <palves@redhat.com>
* common/common-exceptions.h (GDB_XCPT_TRY): Add comment.
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index c2bf0c0..6098f71 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -8192,7 +8192,7 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
mips_regnum.dspctl = -1;
dspacc = 72;
dspctl = 78;
- num_regs = 79;
+ num_regs = 90;
reg_names = mips_linux_reg_names;
}
else
@@ -8311,6 +8311,8 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
return NULL;
}
+ num_regs = mips_regnum.fp_implementation_revision + 1;
+
if (dspacc >= 0)
{
feature = tdesc_find_feature (info.target_desc,
@@ -8344,6 +8346,8 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
mips_regnum.dspacc = dspacc;
mips_regnum.dspctl = dspctl;
+
+ num_regs = mips_regnum.dspctl + 1;
}
}