aboutsummaryrefslogtreecommitdiff
path: root/gdb/osabi.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2005-02-21 04:31:59 +0000
committerAndrew Cagney <cagney@redhat.com>2005-02-21 04:31:59 +0000
commit7ab044018aac127cb2867aadf8faa4a3a2e46142 (patch)
tree9bed9e14cf7de9e50d165b8178bafbedc47120b4 /gdb/osabi.c
parent78f5381d69fee5c3fc74a2358267b425190cad54 (diff)
downloadgdb-7ab044018aac127cb2867aadf8faa4a3a2e46142.zip
gdb-7ab044018aac127cb2867aadf8faa4a3a2e46142.tar.gz
gdb-7ab044018aac127cb2867aadf8faa4a3a2e46142.tar.bz2
2005-02-20 Andrew Cagney <cagney@gnu.org>
Use add_setshow_enum_cmd through out. * arch-utils.c, charset.c, demangle.c, i386-tdep.c: Update. * infrun.c, mips-tdep.c, osabi.c, serial.c, tui/tui-win.c: Update.
Diffstat (limited to 'gdb/osabi.c')
-rw-r--r--gdb/osabi.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/gdb/osabi.c b/gdb/osabi.c
index 3c4cff0..698e941 100644
--- a/gdb/osabi.c
+++ b/gdb/osabi.c
@@ -597,18 +597,20 @@ set_osabi (char *args, int from_tty, struct cmd_list_element *c)
}
static void
-show_osabi (char *args, int from_tty)
+show_osabi (struct ui_file *file, int from_tty, struct cmd_list_element *c,
+ const char *value)
{
if (user_osabi_state == osabi_auto)
- printf_filtered (_("The current OS ABI is \"auto\" (currently \"%s\").\n"),
- gdbarch_osabi_name (gdbarch_osabi (current_gdbarch)));
+ fprintf_filtered (file,
+ _("The current OS ABI is \"auto\" (currently \"%s\").\n"),
+ gdbarch_osabi_name (gdbarch_osabi (current_gdbarch)));
else
- printf_filtered (_("The current OS ABI is \"%s\".\n"),
- gdbarch_osabi_name (user_selected_osabi));
+ fprintf_filtered (file, _("The current OS ABI is \"%s\".\n"),
+ gdbarch_osabi_name (user_selected_osabi));
if (GDB_OSABI_DEFAULT != GDB_OSABI_UNKNOWN)
- printf_filtered (_("The default OS ABI is \"%s\".\n"),
- gdbarch_osabi_name (GDB_OSABI_DEFAULT));
+ fprintf_filtered (file, _("The default OS ABI is \"%s\".\n"),
+ gdbarch_osabi_name (GDB_OSABI_DEFAULT));
}
extern initialize_file_ftype _initialize_gdb_osabi; /* -Wmissing-prototype */
@@ -629,11 +631,12 @@ _initialize_gdb_osabi (void)
generic_elf_osabi_sniffer);
/* Register the "set osabi" command. */
- c = add_set_enum_cmd ("osabi", class_support, gdb_osabi_available_names,
- &set_osabi_string, "Set OS ABI of target.", &setlist);
-
- set_cmd_sfunc (c, set_osabi);
- add_cmd ("osabi", class_support, show_osabi, _("Show OS/ABI of target."),
- &showlist);
+ add_setshow_enum_cmd ("osabi", class_support, gdb_osabi_available_names,
+ &set_osabi_string, _("\
+Set OS ABI of target."), _("\
+Show OS ABI of target."), NULL,
+ set_osabi,
+ show_osabi,
+ &setlist, &showlist);
user_osabi_state = osabi_auto;
}