aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2007-11-09 23:38:51 +0000
committerKevin Buettner <kevinb@redhat.com>2007-11-09 23:38:51 +0000
commitbbc1a78472cfdce40f23258372411fd3b30bb114 (patch)
tree2048a19d4834efd4bef4ddc2215597fd386f94c8 /gdb
parentd12348b84844ad2841dd0b493f9557d0e291cf18 (diff)
downloadgdb-bbc1a78472cfdce40f23258372411fd3b30bb114.zip
gdb-bbc1a78472cfdce40f23258372411fd3b30bb114.tar.gz
gdb-bbc1a78472cfdce40f23258372411fd3b30bb114.tar.bz2
* 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.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/mn10300-tdep.c8
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 <kevinb@redhat.com>
+
+ * 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 <brobecker@adacore.com>
* 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];