From 9f67fc596b36ba46f31b2854655b5cbeffd91da9 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 29 Mar 2021 08:25:13 -0600 Subject: Remove parameter from language_info I noticed that language_info is only ever called with a value of '1'. This patch removes the parameter. 2021-03-29 Tom Tromey * top.c (check_frame_language_change): Update. * language.c (language_info): Remove parameter. * language.h (language_info): Remove parameter. --- gdb/ChangeLog | 6 ++++++ gdb/language.c | 15 +++------------ gdb/language.h | 5 ++++- gdb/top.c | 3 ++- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 938b0ac..f26d06e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2021-03-29 Tom Tromey + + * top.c (check_frame_language_change): Update. + * language.c (language_info): Remove parameter. + * language.h (language_info): Remove parameter. + 2021-03-29 Luis Machado * compile/compile.c (get_args): Don't add empty argv entries. diff --git a/gdb/language.c b/gdb/language.c index f38d64f..4cb71d6 100644 --- a/gdb/language.c +++ b/gdb/language.c @@ -374,26 +374,17 @@ set_language (enum language lang) } -/* 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); - } } diff --git a/gdb/language.h b/gdb/language.h index 5afb833..21ed47b 100644 --- a/gdb/language.h +++ b/gdb/language.h @@ -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); diff --git a/gdb/top.c b/gdb/top.c index 31b751f..6dd2fe8 100644 --- 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; } -- cgit v1.1