aboutsummaryrefslogtreecommitdiff
path: root/gdb/main.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2025-01-31 14:17:08 -0700
committerTom Tromey <tromey@adacore.com>2025-03-21 09:26:48 -0600
commita6bc5efb91236fe632b0ca329dc1f0123036262d (patch)
treee93120e5e5f80d3a9eca2f45777022f00e6a5f22 /gdb/main.c
parent45e4b960fd9517db11e4bdcf489ad14f39bdddf4 (diff)
downloadbinutils-a6bc5efb91236fe632b0ca329dc1f0123036262d.zip
binutils-a6bc5efb91236fe632b0ca329dc1f0123036262d.tar.gz
binutils-a6bc5efb91236fe632b0ca329dc1f0123036262d.tar.bz2
Simplify warning_pre_print
This changes warning_pre_print to not include the text "warning", which is now unconditional. I think this is a bit clearer, and anyway it is convenient to support the next patch. Reviewed-By: Keith Seitz <keiths@redhat.com>
Diffstat (limited to 'gdb/main.c')
-rw-r--r--gdb/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/main.c b/gdb/main.c
index d126e98..b173eb6 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -705,7 +705,7 @@ captured_main_1 (struct captured_main_args *context)
/* Prefix warning messages with the command name. */
gdb::unique_xmalloc_ptr<char> tmp_warn_preprint
- = xstrprintf ("%s: warning: ", gdb_program_name);
+ = xstrprintf ("%s: ", gdb_program_name);
warning_pre_print = tmp_warn_preprint.get ();
current_directory = getcwd (NULL, 0);
@@ -1169,7 +1169,7 @@ captured_main_1 (struct captured_main_args *context)
/* Set off error and warning messages with a blank line. */
tmp_warn_preprint.reset ();
- warning_pre_print = _("\nwarning: ");
+ warning_pre_print = "\n";
/* Read and execute the system-wide gdbinit file, if it exists.
This is done *before* all the command line arguments are
@@ -1274,7 +1274,7 @@ captured_main_1 (struct captured_main_args *context)
current_inferior ()->set_tty (ttyarg);
/* Error messages should no longer be distinguished with extra output. */
- warning_pre_print = _("warning: ");
+ warning_pre_print = "";
/* Read the .gdbinit file in the current directory, *if* it isn't
the same as the $HOME/.gdbinit file (it should exist, also). */