aboutsummaryrefslogtreecommitdiff
path: root/gdb/rs6000-nat.c
diff options
context:
space:
mode:
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>2001-12-20 23:29:24 +0000
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>2001-12-20 23:29:24 +0000
commit2a18e3d9a9945171c6bacb18bbfe251e3666a237 (patch)
tree386c84ae09f0fda37fbae938c3e8506af4372937 /gdb/rs6000-nat.c
parenta790644d3ceb6d3456dfaec76e4cd9ef0099f1a6 (diff)
downloadgdb-2a18e3d9a9945171c6bacb18bbfe251e3666a237.zip
gdb-2a18e3d9a9945171c6bacb18bbfe251e3666a237.tar.gz
gdb-2a18e3d9a9945171c6bacb18bbfe251e3666a237.tar.bz2
2001-12-20 Elena Zannoni <ezannoni@redhat.com>
* rs6000-nat.c (fetch_register): Don't error out unless the register number is really bogus.
Diffstat (limited to 'gdb/rs6000-nat.c')
-rw-r--r--gdb/rs6000-nat.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c
index 1f2e1f7..12229cd 100644
--- a/gdb/rs6000-nat.c
+++ b/gdb/rs6000-nat.c
@@ -206,9 +206,12 @@ fetch_register (int regno)
/* Bogus register number. */
else if (regno > LAST_UISA_SP_REGNUM)
- fprintf_unfiltered (gdb_stderr,
- "gdb error: register no %d not implemented.\n",
- regno);
+ {
+ if (regno >= NUM_REGS)
+ fprintf_unfiltered (gdb_stderr,
+ "gdb error: register no %d not implemented.\n",
+ regno);
+ }
/* Fixed-point registers. */
else