From: Kevin Buettner Date: Sat, 3 Sep 2005 01:45:30 +0000 (+0000) Subject: * mn10300-tdep.c (mn10300_dwarf2_reg_to_regnum): Use ARRAY_SIZE. X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=52f0b832d7b4afcd85f54b6e6390881c7a8f586b;p=deliverable%2Fbinutils-gdb.git * mn10300-tdep.c (mn10300_dwarf2_reg_to_regnum): Use ARRAY_SIZE. Change internal error to warning. Add i18n markup to warning string. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3508c498c0..c791019c21 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2005-09-02 Kevin Buettner + + * mn10300-tdep.c (mn10300_dwarf2_reg_to_regnum): Use ARRAY_SIZE. + Change internal error to warning. Add i18n markup to warning + string. + 2005-09-02 Kevin Buettner * mn10300-tdep.c (mn10300_dwarf2_reg_to_regnum): New function. diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c index db9953b31a..532015d404 100644 --- a/gdb/mn10300-tdep.c +++ b/gdb/mn10300-tdep.c @@ -961,10 +961,9 @@ mn10300_dwarf2_reg_to_regnum (int dwarf2) }; if (dwarf2 < 0 - || dwarf2 >= (sizeof (dwarf2_to_gdb) / sizeof (dwarf2_to_gdb[0])) + || dwarf2 >= ARRAY_SIZE (dwarf2_to_gdb) || dwarf2_to_gdb[dwarf2] == -1) - internal_error (__FILE__, __LINE__, - "bogus register number in debug info: %d", dwarf2); + warning (_("bogus register number in debug info: %d"), dwarf2); return dwarf2_to_gdb[dwarf2]; }