This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA] MIPS: Add mappings for HI and LO registers
- From: Kevin Buettner <kevinb at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Mon, 31 Mar 2003 16:11:06 -0700
- Subject: [RFA] MIPS: Add mappings for HI and LO registers
I've recently submitted some gcc patches which add debug info related
mappings for the MIPS "hi" and "lo" registers. (Previously, if either of
these appeared in DWARF 2 debug output, they'd show up as -1.)
The patch below adds the corresponding code for mapping these
registers from values that'll (hopefully soon) appear in debug info to
gdb's internal register numbers.
The most recent patch on the gcc side is:
http://gcc.gnu.org/ml/gcc-patches/2003-03/msg02596.html
Okay? (If so, I'll wait for approval on the gcc side before committing
this patch.)
* mips-tdep.c (mips_dwarf_dwarf2_ecoff_reg_to_regnum)
(mips_stab_reg_to_regnum): Add mappings for HI_REGNUM and LO_REGNUM.
Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.178
diff -u -p -r1.178 mips-tdep.c
--- mips-tdep.c 26 Mar 2003 22:39:52 -0000 1.178
+++ mips-tdep.c 31 Mar 2003 22:49:23 -0000
@@ -5573,6 +5573,10 @@ mips_stab_reg_to_regnum (int num)
return num;
else if (num >= 38 && num < 70)
return num + FP0_REGNUM - 38;
+ else if (num == 70)
+ return HI_REGNUM;
+ else if (num == 71)
+ return LO_REGNUM;
else
{
/* This will hopefully (eventually) provoke a warning. Should
@@ -5591,6 +5595,10 @@ mips_dwarf_dwarf2_ecoff_reg_to_regnum (i
return num;
else if (num >= 32 && num < 64)
return num + FP0_REGNUM - 32;
+ else if (num == 64)
+ return HI_REGNUM;
+ else if (num == 65)
+ return LO_REGNUM;
else
{
/* This will hopefully (eventually) provoke a warning. Should