This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
RFA: Update show_mips_abi for use with add_setshow_enum_cmd
- From: Jim Blandy <jimb at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: 28 Feb 2005 15:52:00 -0500
- Subject: RFA: Update show_mips_abi for use with add_setshow_enum_cmd
With this patch, mips-elf compiles with -Werror again.
2005-02-28 Jim Blandy <jimb@redhat.com>
* mips-tdep.c (show_mips_abi): Change calling conventions to match
those expected by add_setshow_enum_cmd. Use 'file' argument as
appropriate.
Index: gdb/mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.377
diff -c -p -r1.377 mips-tdep.c
*** gdb/mips-tdep.c 21 Feb 2005 04:31:58 -0000 1.377
--- gdb/mips-tdep.c 28 Feb 2005 20:48:48 -0000
*************** mips_abi_update (char *ignore_args, int
*** 5059,5069 ****
/* Print out which MIPS ABI is in use. */
static void
! show_mips_abi (char *ignore_args, int from_tty)
{
if (gdbarch_bfd_arch_info (current_gdbarch)->arch != bfd_arch_mips)
! printf_filtered
! ("The MIPS ABI is unknown because the current architecture is not MIPS.\n");
else
{
enum mips_abi global_abi = global_mips_abi ();
--- 5059,5074 ----
/* Print out which MIPS ABI is in use. */
static void
! show_mips_abi (struct ui_file *file,
! int from_tty,
! struct cmd_list_element *ignored_cmd,
! const char *ignored_value)
{
if (gdbarch_bfd_arch_info (current_gdbarch)->arch != bfd_arch_mips)
! fprintf_filtered
! (file,
! "The MIPS ABI is unknown because the current architecture "
! "is not MIPS.\n");
else
{
enum mips_abi global_abi = global_mips_abi ();
*************** show_mips_abi (char *ignore_args, int fr
*** 5071,5088 ****
const char *actual_abi_str = mips_abi_strings[actual_abi];
if (global_abi == MIPS_ABI_UNKNOWN)
! printf_filtered
! ("The MIPS ABI is set automatically (currently \"%s\").\n",
actual_abi_str);
else if (global_abi == actual_abi)
! printf_filtered
! ("The MIPS ABI is assumed to be \"%s\" (due to user setting).\n",
actual_abi_str);
else
{
/* Probably shouldn't happen... */
! printf_filtered
! ("The (auto detected) MIPS ABI \"%s\" is in use even though the user setting was \"%s\".\n",
actual_abi_str, mips_abi_strings[global_abi]);
}
}
--- 5076,5096 ----
const char *actual_abi_str = mips_abi_strings[actual_abi];
if (global_abi == MIPS_ABI_UNKNOWN)
! fprintf_filtered
! (file,
! "The MIPS ABI is set automatically (currently \"%s\").\n",
actual_abi_str);
else if (global_abi == actual_abi)
! fprintf_filtered
! (file,
! "The MIPS ABI is assumed to be \"%s\" (due to user setting).\n",
actual_abi_str);
else
{
/* Probably shouldn't happen... */
! fprintf_filtered
! (file,
! "The (auto detected) MIPS ABI \"%s\" is in use even though the user setting was \"%s\".\n",
actual_abi_str, mips_abi_strings[global_abi]);
}
}