Fix GDB breakage due to addition of new nios2 mach types in BFD.
authorSandra Loosemore <sandra@codesourcery.com>
Sun, 12 Jul 2015 14:13:12 +0000 (07:13 -0700)
committerSandra Loosemore <sandra@codesourcery.com>
Sun, 12 Jul 2015 14:13:12 +0000 (07:13 -0700)
2015-07-12  Sandra Loosemore  <sandra@codesourcery.com>

gdb/
* nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Register
all nios2 mach variants.

gdb/ChangeLog
gdb/nios2-linux-tdep.c

index 507042819cc77d5e4ea99f1d9b9fb9a03dcd60ce..5e687f0eafb85ed740d16021f6d85e51da719959 100644 (file)
@@ -1,3 +1,8 @@
+2015-07-12  Sandra Loosemore  <sandra@codesourcery.com>
+
+       * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Register
+       all nios2 mach variants.
+
 2015-07-10  Kevin Buettner  <kevinb@redhat.com>
 
        * rx-tdep.c (rx_get_opcode_byte): Use target_read_code instead
index 0a837b0a0931bdd644d083eb4fcce5855ea65839..68c949a09fb87b6bd0d7b5215e10de164001eb34 100644 (file)
@@ -223,8 +223,14 @@ extern initialize_file_ftype _initialize_nios2_linux_tdep;
 void
 _initialize_nios2_linux_tdep (void)
 {
-  gdbarch_register_osabi (bfd_arch_nios2, 0, GDB_OSABI_LINUX,
-                          nios2_linux_init_abi);
+
+  const struct bfd_arch_info *arch_info;
+
+  for (arch_info = bfd_lookup_arch (bfd_arch_nios2, 0);
+       arch_info != NULL;
+       arch_info = arch_info->next)
+    gdbarch_register_osabi (bfd_arch_nios2, arch_info->mach,
+                           GDB_OSABI_LINUX, nios2_linux_init_abi);
 
   initialize_tdesc_nios2_linux ();
 }