2009-07-20 Pedro Alves <pedro@codesourcery.com>
[deliverable/binutils-gdb.git] / gdb / arch-utils.c
index 188dc9b6f7766934845246e99b56d8a61de44d8d..458aa062190164c800858ecbd0e63cdc6b4d44d4 100644 (file)
@@ -710,8 +710,15 @@ gdbarch_info_fill (struct gdbarch_info *info)
   info->byte_order_for_code = info->byte_order;
 
   /* "(gdb) set osabi ...".  Handled by gdbarch_lookup_osabi.  */
+  /* From the manual override, or from file.  */
   if (info->osabi == GDB_OSABI_UNINITIALIZED)
     info->osabi = gdbarch_lookup_osabi (info->abfd);
+  /* From the target.  */
+  if (info->osabi == GDB_OSABI_UNKNOWN && info->target_desc != NULL)
+    info->osabi = tdesc_osabi (info->target_desc);
+  /* From the configured default.  */
+  if (info->osabi == GDB_OSABI_UNKNOWN)
+    info->osabi = GDB_OSABI_DEFAULT;
 
   /* Must have at least filled in the architecture.  */
   gdb_assert (info->bfd_arch_info != NULL);
This page took 0.024518 seconds and 4 git commands to generate.