+ for (i = 1; i < GDB_OSABI_INVALID; i++)
+ {
+ enum gdb_osabi osabi = (enum gdb_osabi) i;
+
+ if (strcmp (set_osabi_string, gdbarch_osabi_name (osabi)) == 0)
+ {
+ user_selected_osabi = osabi;
+ user_osabi_state = osabi_user;
+ break;
+ }
+ }
+ if (i == GDB_OSABI_INVALID)
+ internal_error (__FILE__, __LINE__,
+ _("Invalid OS ABI \"%s\" passed to command handler."),
+ set_osabi_string);
+ }
+
+ /* NOTE: At some point (true multiple architectures) we'll need to be more
+ graceful here. */
+ gdbarch_info_init (&info);
+ if (! gdbarch_update_p (info))
+ internal_error (__FILE__, __LINE__, _("Updating OS ABI failed."));
+}
+
+static void
+show_osabi (struct ui_file *file, int from_tty, struct cmd_list_element *c,
+ const char *value)
+{
+ if (user_osabi_state == osabi_auto)
+ fprintf_filtered (file,
+ _("The current OS ABI is \"auto\" "
+ "(currently \"%s\").\n"),
+ gdbarch_osabi_name (gdbarch_osabi (get_current_arch ())));
+ else
+ fprintf_filtered (file, _("The current OS ABI is \"%s\".\n"),
+ gdbarch_osabi_name (user_selected_osabi));
+
+ if (GDB_OSABI_DEFAULT != GDB_OSABI_UNKNOWN)
+ fprintf_filtered (file, _("The default OS ABI is \"%s\".\n"),
+ gdbarch_osabi_name (GDB_OSABI_DEFAULT));
+}
+
+void _initialize_gdb_osabi ();