This is the mail archive of the gdb-patches@sources.redhat.com 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]

[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


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