From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@adacore.com>
Subject: [PATCH] Remove parameter from language_info
Date: Mon, 29 Mar 2021 08:26:06 -0600 [thread overview]
Message-ID: <20210329142606.2501921-1-tromey@adacore.com> (raw)
I noticed that language_info is only ever called with a value of '1'.
This patch removes the parameter.
gdb/ChangeLog
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 | 6 ++++++
gdb/language.c | 14 +++-----------
gdb/language.h | 2 +-
gdb/top.c | 3 ++-
4 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/gdb/language.c b/gdb/language.c
index f38d64f28d7..872f2553b22 100644
--- a/gdb/language.c
+++ b/gdb/language.c
@@ -375,25 +375,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. */
+ type checking. */
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
diff --git a/gdb/language.h b/gdb/language.h
index 5afb8335961..b62ff845123 100644
--- a/gdb/language.h
+++ b/gdb/language.h
@@ -733,7 +733,7 @@ struct symbol *
(LANG)->la_language == language_cplus || \
(LANG)->la_language == language_objc)
-extern void language_info (int);
+extern void language_info ();
extern enum language set_language (enum language);
\f
diff --git a/gdb/top.c b/gdb/top.c
index 31b751fa262..6dd2fe8a3b0 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;
}
--
2.26.2
next reply other threads:[~2021-03-29 14:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-29 14:26 Tom Tromey [this message]
2021-03-29 14:38 ` Simon Marchi
2021-03-29 15:35 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210329142606.2501921-1-tromey@adacore.com \
--to=tromey@adacore.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).