This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA] rs6000-nat.c fetch_register error condition.
- From: Elena Zannoni <ezannoni at cygnus dot com>
- To: gdb-patches at sources dot redhat dot com
- Cc: kevinb at cygnus dot com
- Date: Thu, 20 Dec 2001 11:24:14 -0500
- Subject: [RFA] rs6000-nat.c fetch_register error condition.
I am trying to break down the Altivec patch in smaller pieces that
don't require a ptrace interface.
I thought this bit had been approved by Kevin in
http://sources.redhat.com/ml/gdb-patches/2001-11/msg00564.html
but it wasn't.
Kevin, OK to commit?
Elena
2001-12-20 Elena Zannoni <ezannoni@redhat.com>
* rs6000-nat.c (fetch_register): Don't error out unless the
register number is really bogus.
Index: rs6000-nat.c
===================================================================
RCS file: /cvs/uberbaum/gdb/rs6000-nat.c,v
retrieving revision 1.18
diff -u -r1.18 rs6000-nat.c
--- rs6000-nat.c 2001/12/19 14:14:52 1.18
+++ rs6000-nat.c 2001/12/20 16:57:30
@@ -206,9 +206,12 @@
/* 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