aboutsummaryrefslogtreecommitdiff
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
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.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/rs6000-nat.c9
2 files changed, 11 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 2be4f28..c796c70 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2001-12-20 Elena Zannoni <ezannoni@redhat.com>
+
+ * rs6000-nat.c (fetch_register): Don't error out unless the
+ register number is really bogus.
+
2001-12-20 Michael Snyder <msnyder@redhat.com>
* maint.c (maintenance_info_sections): Accept new argument
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