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]

Re: [RFA] Use correct register names for MIPS n32/n64 ABIs


On Mar 18, 11:39pm, Kevin Buettner wrote:

> Hmm... I see that I also got the NUM_REGS check wrong.  (It should be 
> regno < NUM_REGS, not regno <= NUM_REGS.)  I'll check in a one line
> fix for that in a moment.

Okay, here's what I checked in for that fix:

	* mips-tdep.c (mips_register_name): Fix fencepost error involving
	NUM_REGS bounds check.

Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.173
diff -u -p -r1.173 mips-tdep.c
--- mips-tdep.c	19 Mar 2003 06:21:13 -0000	1.173
+++ mips-tdep.c	19 Mar 2003 06:39:44 -0000
@@ -402,7 +402,7 @@ mips_register_name (int regno)
       else
 	return mips_gpr_names[regno];
     }
-  else if (32 <= regno && regno <= NUM_REGS)
+  else if (32 <= regno && regno < NUM_REGS)
     return mips_processor_reg_names[regno - 32];
   else
     internal_error (__FILE__, __LINE__,



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