From: "Christian Biesinger via gdb-patches" <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Cc: Christian Biesinger <cbiesinger@google.com>
Subject: [PATCH] Move declaration of lang_frame_mismatch_warn to header.
Date: Mon, 07 Oct 2019 17:57:00 -0000 [thread overview]
Message-ID: <20191007175734.257671-1-cbiesinger@google.com> (raw)
gdb/ChangeLog:
2019-10-07 Christian Biesinger <cbiesinger@google.com>
* language.c (lang_frame_mismatch_warn): Make const and move
comment...
* language.h (lang_frame_mismatch_warn): ... here. Also add
declaration.
* top.c (lang_frame_mismatch_warn): Remove declaration.
---
gdb/language.c | 5 ++---
gdb/language.h | 5 +++++
gdb/top.c | 2 --
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/gdb/language.c b/gdb/language.c
index e95084f1154..2bebc05a1f3 100644
--- a/gdb/language.c
+++ b/gdb/language.c
@@ -112,9 +112,8 @@ static const char *language;
static const char *range;
static const char *case_sensitive;
-/* Warning issued when current_language and the language of the current
- frame do not match. */
-char lang_frame_mismatch_warn[] =
+/* See language.h. */
+const char lang_frame_mismatch_warn[] =
"Warning: the current language does not match this frame.";
\f
/* This page contains the functions corresponding to GDB commands
diff --git a/gdb/language.h b/gdb/language.h
index 0088e5de2dd..aa19f8ee9b4 100644
--- a/gdb/language.h
+++ b/gdb/language.h
@@ -483,6 +483,11 @@ extern const struct language_defn *current_language;
extern const struct language_defn *expected_language;
+/* Warning issued when current_language and the language of the current
+ frame do not match. */
+
+extern const char lang_frame_mismatch_warn[];
+
/* language_mode ==
language_mode_auto: current_language automatically set upon selection
of scope (e.g. stack frame)
diff --git a/gdb/top.c b/gdb/top.c
index a1a08e0b99e..0c1a213e9d5 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -110,8 +110,6 @@ gen_ret_current_ui_field_ptr (struct ui_out *, current_uiout)
int inhibit_gdbinit = 0;
-extern char lang_frame_mismatch_warn[]; /* language.c */
-
/* Flag for whether we want to confirm potentially dangerous
operations. Default is yes. */
--
2.23.0.581.g78d2f28ef7-goog
next reply other threads:[~2019-10-07 17:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-07 17:57 Christian Biesinger via gdb-patches [this message]
2019-10-07 22:20 ` Tom Tromey
2019-10-07 22:27 ` Christian Biesinger via gdb-patches
2019-10-07 22:28 ` Christian Biesinger via gdb-patches
2019-10-08 12:46 ` Tom Tromey
2019-10-08 15:16 ` Christian Biesinger via gdb-patches
2019-10-08 12:46 ` 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=20191007175734.257671-1-cbiesinger@google.com \
--to=gdb-patches@sourceware.org \
--cc=cbiesinger@google.com \
/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