aboutsummaryrefslogtreecommitdiff
path: root/gdb/mn10300-tdep.c
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2005-09-03 01:45:30 +0000
committerKevin Buettner <kevinb@redhat.com>2005-09-03 01:45:30 +0000
commit52f0b832d7b4afcd85f54b6e6390881c7a8f586b (patch)
treed6ea56db1dd5ade7fadefb5cc5ece579060024a5 /gdb/mn10300-tdep.c
parent336c28c5f7c58b3525fc86091fcf0ba58c702aaf (diff)
downloadgdb-52f0b832d7b4afcd85f54b6e6390881c7a8f586b.zip
gdb-52f0b832d7b4afcd85f54b6e6390881c7a8f586b.tar.gz
gdb-52f0b832d7b4afcd85f54b6e6390881c7a8f586b.tar.bz2
* mn10300-tdep.c (mn10300_dwarf2_reg_to_regnum): Use ARRAY_SIZE.
Change internal error to warning. Add i18n markup to warning string.
Diffstat (limited to 'gdb/mn10300-tdep.c')
-rw-r--r--gdb/mn10300-tdep.c5
1 files changed, 2 insertions, 3 deletions
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];
}