projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
52f0b83
)
Make sure that a reasonable value is always returned by
author
Kevin Buettner
<kevinb@redhat.com>
Sat, 3 Sep 2005 01:55:26 +0000
(
01:55
+0000)
committer
Kevin Buettner
<kevinb@redhat.com>
Sat, 3 Sep 2005 01:55:26 +0000
(
01:55
+0000)
mn10300_dwarf2_reg_to_regnum().
gdb/mn10300-tdep.c
patch
|
blob
|
history
diff --git
a/gdb/mn10300-tdep.c
b/gdb/mn10300-tdep.c
index 532015d4049d5d9feb30bc3611984a39ab14ddb4..4e9f372dfdfd7c9c6136d1df0af85787749557ff 100644
(file)
--- a/
gdb/mn10300-tdep.c
+++ b/
gdb/mn10300-tdep.c
@@
-963,7
+963,10
@@
mn10300_dwarf2_reg_to_regnum (int dwarf2)
if (dwarf2 < 0
|| dwarf2 >= ARRAY_SIZE (dwarf2_to_gdb)
|| dwarf2_to_gdb[dwarf2] == -1)
- warning (_("bogus register number in debug info: %d"), dwarf2);
+ {
+ warning (_("Bogus register number in debug info: %d"), dwarf2);
+ return 0;
+ }
return dwarf2_to_gdb[dwarf2];
}