From bbc1a78472cfdce40f23258372411fd3b30bb114 Mon Sep 17 00:00:00 2001 From: Kevin Buettner Date: Fri, 9 Nov 2007 23:38:51 +0000 Subject: * 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. --- gdb/ChangeLog | 6 ++++++ gdb/mn10300-tdep.c | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fc58c2a..e74dcf6 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 3cd2f2f..9b59c50 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]; -- cgit v1.1