public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
From: gdb-buildbot@sergiodj.net
To: gdb-testers@sourceware.org
Subject: [binutils-gdb] Move declaration of lang_frame_mismatch_warn to header.
Date: Mon, 14 Oct 2019 16:38:00 -0000	[thread overview]
Message-ID: <34916edc47a26d591bf95784cd90fe1dcd533ab5@gdb-build> (raw)

*** TEST RESULTS FOR COMMIT 34916edc47a26d591bf95784cd90fe1dcd533ab5 ***

commit 34916edc47a26d591bf95784cd90fe1dcd533ab5
Author:     Christian Biesinger <cbiesinger@google.com>
AuthorDate: Mon Oct 7 12:55:44 2019 -0500
Commit:     Christian Biesinger <cbiesinger@google.com>
CommitDate: Tue Oct 8 10:14:57 2019 -0500

    Move declaration of lang_frame_mismatch_warn to header.
    
    Also makes it localizable.
    
    gdb/ChangeLog:
    
    2019-10-08  Christian Biesinger  <cbiesinger@google.com>
    
            * language.c (show_language_command): Pass lang_frame_mismatch_warn
            through _().
            (lang_frame_mismatch_warn): Make const, mark with N_(), and
            move comment...
            * language.h (lang_frame_mismatch_warn): ... here. Also add
            declaration.
            * top.c (lang_frame_mismatch_warn): Remove declaration.
            (check_frame_language_change): Pass lang_frame_mismatch_warn
            through _().

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 3912429dcf..20a001e370 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,15 @@
+2019-10-08  Christian Biesinger  <cbiesinger@google.com>
+
+	* language.c (show_language_command): Pass lang_frame_mismatch_warn
+	through _().
+	(lang_frame_mismatch_warn): Make const, mark with N_(), and
+	move comment...
+	* language.h (lang_frame_mismatch_warn): ... here. Also add
+	declaration.
+	* top.c (lang_frame_mismatch_warn): Remove declaration.
+	(check_frame_language_change): Pass lang_frame_mismatch_warn
+	through _().
+
 2019-10-07  Christian Biesinger  <cbiesinger@google.com>
 
 	* c-lang.h (vtbl_ptr_name): Declare.
diff --git a/gdb/language.c b/gdb/language.c
index e95084f115..02c448fb1d 100644
--- a/gdb/language.c
+++ b/gdb/language.c
@@ -112,10 +112,9 @@ 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[] =
-"Warning: the current language does not match this frame.";
+/* See language.h.  */
+const char lang_frame_mismatch_warn[] =
+N_("Warning: the current language does not match this frame.");
 \f
 /* This page contains the functions corresponding to GDB commands
    and their helpers.  */
@@ -147,7 +146,7 @@ show_language_command (struct ui_file *file, int from_tty,
       if (flang != language_unknown
 	  && language_mode == language_mode_manual
 	  && current_language->la_language != flang)
-	printf_filtered ("%s\n", lang_frame_mismatch_warn);
+	printf_filtered ("%s\n", _(lang_frame_mismatch_warn));
     }
 }
 
diff --git a/gdb/language.h b/gdb/language.h
index 0088e5de2d..aa19f8ee9b 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 a1a08e0b99..78355a0315 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.  */
 
@@ -492,7 +490,7 @@ check_frame_language_change (void)
 	  && flang != language_unknown
 	  && flang != current_language->la_language)
 	{
-	  printf_filtered ("%s\n", lang_frame_mismatch_warn);
+	  printf_filtered ("%s\n", _(lang_frame_mismatch_warn));
 	  warned = 1;
 	}
     }


             reply	other threads:[~2019-10-14 16:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-14 16:38 gdb-buildbot [this message]
2019-10-14 16:38 ` Failures on Ubuntu-Aarch64-m64, branch master gdb-buildbot
2019-10-14 18:14 ` Failures on Ubuntu-Aarch64-native-extended-gdbserver-m64, " gdb-buildbot
2019-10-14 19:03 ` Failures on Ubuntu-Aarch64-native-gdbserver-m64, " gdb-buildbot
2019-10-20 13:37 ` Failures on Fedora-i686, " gdb-buildbot
2019-10-20 14:08 ` Failures on Fedora-x86_64-m32, " gdb-buildbot
2019-10-20 14:36 ` Failures on Fedora-x86_64-m64, " gdb-buildbot
2019-10-20 15:30 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " gdb-buildbot

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=34916edc47a26d591bf95784cd90fe1dcd533ab5@gdb-build \
    --to=gdb-buildbot@sergiodj.net \
    --cc=gdb-testers@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).