[commit,arm] Fix incorrect "fpscr" register number

Message ID 201104281643.p3SGhBpZ020148@d06av02.portsmouth.uk.ibm.com
State Accepted
Headers show

Commit Message

Ulrich Weigand April 28, 2011, 4:43 p.m.
http://sourceware.org/ml/gdb-patches/2011-04/msg00019.html

ChangeLog:

	* arm-tdep.c (arm_gdbarch_init): Enfore correct register number
	for "fpscr" in target description.

Patch

Index: gdb/arm-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/arm-tdep.c,v
retrieving revision 1.340
diff -u -p -r1.340 arm-tdep.c
--- gdb/arm-tdep.c	1 Apr 2011 11:57:02 -0000	1.340
+++ gdb/arm-tdep.c	1 Apr 2011 18:41:32 -0000
@@ -8387,8 +8387,13 @@  arm_gdbarch_init (struct gdbarch_info in
 	      if (!valid_p)
 		break;
 	    }
+	  if (!valid_p && i == 16)
+	    valid_p = 1;
 
-	  if (!valid_p && i != 16)
+	  /* Also require FPSCR.  */
+	  valid_p &= tdesc_numbered_register (feature, tdesc_data,
+					      ARM_FPSCR_REGNUM, "fpscr");
+	  if (!valid_p)
 	    {
 	      tdesc_data_cleanup (tdesc_data);
 	      return NULL;