* 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 954bc2c..5e717a4 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 9d8f5ba..bb52ad4 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;