From: Kevin Buettner Date: Fri, 9 Nov 2007 23:38:51 +0000 (+0000) Subject: * mn10300-tdep.c (mn10300_dwarf2_reg_to_regnum): Add missing X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bbc1a78472cfdce40f23258372411fd3b30bb114;p=binutils-gdb.git * mn10300-tdep.c (mn10300_dwarf2_reg_to_regnum): Add missing register number to map. Adjust warning check and error/warning return value code to match expectations of this function's callers. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fc58c2a158a..e74dcf6965a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2007-11-09 Kevin Buettner + + * mn10300-tdep.c (mn10300_dwarf2_reg_to_regnum): Add missing + register number to map. Adjust warning check and error/warning + return value code to match expectations of this function's callers. + 2007-11-09 Joel Brobecker * stack.c (print_this_frame_argument_p): Handle arguments passed diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c index 3cd2f2f8db8..9b59c50fe29 100644 --- a/gdb/mn10300-tdep.c +++ b/gdb/mn10300-tdep.c @@ -1089,15 +1089,15 @@ mn10300_dwarf2_reg_to_regnum (int dwarf2) 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63 + 56, 57, 58, 59, 60, 61, 62, 63, + 9 }; if (dwarf2 < 0 - || dwarf2 >= ARRAY_SIZE (dwarf2_to_gdb) - || dwarf2_to_gdb[dwarf2] == -1) + || dwarf2 >= ARRAY_SIZE (dwarf2_to_gdb)) { warning (_("Bogus register number in debug info: %d"), dwarf2); - return 0; + return -1; } return dwarf2_to_gdb[dwarf2];