Add `set print repeats' tests for C/C++ arrays
[binutils-gdb.git] / gdb / arch-utils.c
index 4442ec9b82f4199abf80fd33988e43a5a5254241..38e3132668d6e4533fec1aa737aaea279712d179 100644 (file)
@@ -1,6 +1,6 @@
 /* Dynamic architecture support for GDB, the GNU debugger.
 
-   Copyright (C) 1998-2021 Free Software Foundation, Inc.
+   Copyright (C) 1998-2022 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -375,18 +375,18 @@ show_endian (struct ui_file *file, int from_tty, struct cmd_list_element *c,
 {
   if (target_byte_order_user == BFD_ENDIAN_UNKNOWN)
     if (gdbarch_byte_order (get_current_arch ()) == BFD_ENDIAN_BIG)
-      fprintf_unfiltered (file, _("The target endianness is set automatically "
-                                 "(currently big endian).\n"));
+      fprintf_filtered (file, _("The target endianness is set automatically "
+                               "(currently big endian).\n"));
     else
-      fprintf_unfiltered (file, _("The target endianness is set automatically "
-                                 "(currently little endian).\n"));
+      fprintf_filtered (file, _("The target endianness is set automatically "
+                               "(currently little endian).\n"));
   else
     if (target_byte_order_user == BFD_ENDIAN_BIG)
-      fprintf_unfiltered (file,
-                         _("The target is set to big endian.\n"));
+      fprintf_filtered (file,
+                       _("The target is set to big endian.\n"));
     else
-      fprintf_unfiltered (file,
-                         _("The target is set to little endian.\n"));
+      fprintf_filtered (file,
+                       _("The target is set to little endian.\n"));
 }
 
 static void
@@ -405,7 +405,8 @@ set_endian (const char *ignore_args, int from_tty, struct cmd_list_element *c)
     {
       info.byte_order = BFD_ENDIAN_LITTLE;
       if (! gdbarch_update_p (info))
-       printf_unfiltered (_("Little endian target not supported by GDB\n"));
+       fprintf_unfiltered (gdb_stderr,
+                           _("Little endian target not supported by GDB\n"));
       else
        target_byte_order_user = BFD_ENDIAN_LITTLE;
     }
@@ -413,7 +414,8 @@ set_endian (const char *ignore_args, int from_tty, struct cmd_list_element *c)
     {
       info.byte_order = BFD_ENDIAN_BIG;
       if (! gdbarch_update_p (info))
-       printf_unfiltered (_("Big endian target not supported by GDB\n"));
+       fprintf_unfiltered (gdb_stderr,
+                           _("Big endian target not supported by GDB\n"));
       else
        target_byte_order_user = BFD_ENDIAN_BIG;
     }
@@ -567,8 +569,9 @@ set_architecture (const char *ignore_args,
       if (gdbarch_update_p (info))
        target_architecture_user = info.bfd_arch_info;
       else
-       printf_unfiltered (_("Architecture `%s' not recognized.\n"),
-                          set_architecture_string);
+       fprintf_unfiltered (gdb_stderr,
+                           _("Architecture `%s' not recognized.\n"),
+                           set_architecture_string);
     }
   show_architecture (gdb_stdout, from_tty, NULL, NULL);
 }