* arm-tdep.c (arm_gdbarch_init): Enfore correct register number
authorUlrich Weigand <uweigand@de.ibm.com>
Fri, 1 Apr 2011 19:38:15 +0000 (19:38 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Fri, 1 Apr 2011 19:38:15 +0000 (19:38 +0000)
for "fpscr" in target description.

gdb/ChangeLog
gdb/arm-tdep.c

index 954bc2cec11505ec1170e534267e1c3ca9991aad..5e717a4bf5d03a00aa330421a57b91f2fb9d85fa 100644 (file)
@@ -1,3 +1,8 @@
+2011-04-01  Ulrich Weigand  <ulrich.weigand@linaro.org>
+
+       * arm-tdep.c (arm_gdbarch_init): Enfore correct register number
+       for "fpscr" in target description.
+
 2011-04-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        * dwarf2read.c (find_slot_in_mapped_hash): New variable back_to,
index 9d8f5ba86e3a946064a94c42e564b28f8f2d4ce4..bb52ad4255e866dea8ae8c70a591e5d047f28a62 100644 (file)
@@ -8387,8 +8387,13 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
              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;