Remove parameter from language_info
authorTom Tromey <tromey@adacore.com>
Mon, 29 Mar 2021 14:25:13 +0000 (08:25 -0600)
committerTom Tromey <tromey@adacore.com>
Mon, 29 Mar 2021 15:36:11 +0000 (09:36 -0600)
I noticed that language_info is only ever called with a value of '1'.
This patch removes the parameter.

2021-03-29  Tom Tromey  <tromey@adacore.com>

* top.c (check_frame_language_change): Update.
* language.c (language_info): Remove parameter.
* language.h (language_info): Remove parameter.

gdb/ChangeLog
gdb/language.c
gdb/language.h
gdb/top.c

index 938b0ac43fb39d52c2e77e523840210a8c9597c4..f26d06e56b052d300a81dc02a7d6855694401d6e 100644 (file)
@@ -1,3 +1,9 @@
+2021-03-29  Tom Tromey  <tromey@adacore.com>
+
+       * top.c (check_frame_language_change): Update.
+       * language.c (language_info): Remove parameter.
+       * language.h (language_info): Remove parameter.
+
 2021-03-29  Luis Machado  <luis.machado@linaro.org>
 
        * compile/compile.c (get_args): Don't add empty argv entries.
index f38d64f28d77279e418fe1ae7608edc6709a4d02..4cb71d6dfb16beef5a9be65818ff0c56c253ce30 100644 (file)
@@ -374,26 +374,17 @@ set_language (enum language lang)
 }
 \f
 
-/* Print out the current language settings: language, range and
-   type checking.  If QUIETLY, print only what has changed.  */
+/* See language.h.  */
 
 void
-language_info (int quietly)
+language_info ()
 {
-  if (quietly && expected_language == current_language)
+  if (expected_language == current_language)
     return;
 
   expected_language = current_language;
   printf_unfiltered (_("Current language:  %s\n"), language);
   show_language_command (NULL, 1, NULL, NULL);
-
-  if (!quietly)
-    {
-      printf_unfiltered (_("Range checking:    %s\n"), range);
-      show_range_command (NULL, 1, NULL, NULL);
-      printf_unfiltered (_("Case sensitivity:  %s\n"), case_sensitive);
-      show_case_command (NULL, 1, NULL, NULL);
-    }
 }
 \f
 
index 5afb83359612a4ea0f6ab8ef77fe458b4f1a415e..21ed47b35807f606240c0c6df95eb5f486548bf1 100644 (file)
@@ -733,7 +733,10 @@ struct symbol *
                                  (LANG)->la_language == language_cplus || \
                                  (LANG)->la_language == language_objc)
 
-extern void language_info (int);
+/* Print out the current language settings: language, range and
+   type checking.  */
+
+extern void language_info ();
 
 extern enum language set_language (enum language);
 \f
index 31b751fa2622d9187e631435ebccc9d63bf3132e..6dd2fe8a3b062af0e7e38b3200f07ef0cda181e9 100644 (file)
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -482,7 +482,8 @@ check_frame_language_change (void)
     {
       if (language_mode == language_mode_auto && info_verbose)
        {
-         language_info (1);    /* Print what changed.  */
+         /* Print what changed.  */
+         language_info ();
        }
       warned = 0;
     }