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 _().
+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.
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. */
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));
}
}
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)
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. */
&& 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;
}
}