diff options
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/mn10300-tdep.c | 5 |
2 files changed, 8 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3508c49..c791019 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 2005-09-02 Kevin Buettner <kevinb@redhat.com> + * 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 <kevinb@redhat.com> + * mn10300-tdep.c (mn10300_dwarf2_reg_to_regnum): New function. (mn10300_gdbarch_init): Register mn10300_dwarf2_reg_to_regnum(). diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c index db9953b..532015d 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]; } |