From: Kevin Buettner Date: Wed, 19 Mar 2003 06:49:17 +0000 (+0000) Subject: * mips-tdep.c (mips_register_name): Fix fencepost error involving X-Git-Tag: binutils-2_14-branchpoint~455 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b006a9e9ba1e86ef3d865d7b2ae7770c513bc3f5;p=platform%2Fupstream%2Fbinutils.git * mips-tdep.c (mips_register_name): Fix fencepost error involving NUM_REGS bounds check. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 31c7b30..3868d38 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2003-03-18 Kevin Buettner + * mips-tdep.c (mips_register_name): Fix fencepost error involving + NUM_REGS bounds check. + +2003-03-18 Kevin Buettner + * Makefile.in (mips-tdep.o): Add dependency on $(gdb_assert_h). * mips-tdep.c (gdb_assert.h): Include. (mips_generic_reg_names, mips_processor_reg_names): Make static. diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index a011728..d91af12 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -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__,