[binutils-gdb] [gdb] Fix '_ ("foo")'
Tom de Vries
vries@sourceware.org
Mon Nov 17 16:29:42 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=1fa5831f2b2e59e4950ebe9820a709e6124aab49
commit 1fa5831f2b2e59e4950ebe9820a709e6124aab49
Author: Tom de Vries <tdevries@suse.de>
Date: Mon Nov 17 17:29:31 2025 +0100
[gdb] Fix '_ ("foo")'
Our documented style [1] is to use '_("foo")', not '_ ("foo")'.
Fix this in a few places.
[1] https://sourceware.org/gdb/wiki/Internals%20GDB-C-Coding-Standards#Gettext_macro
Diff:
---
gdb/dwarf2/read-debug-names.c | 2 +-
gdb/linux-thread-db.c | 8 ++++----
gdb/riscv-linux-tdep.c | 2 +-
gdb/source.c | 2 +-
gdb/symfile.c | 2 +-
gdb/symtab.c | 2 +-
gdb/top.c | 2 +-
7 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/gdb/dwarf2/read-debug-names.c b/gdb/dwarf2/read-debug-names.c
index 64f76d1b40c..2ebf764880c 100644
--- a/gdb/dwarf2/read-debug-names.c
+++ b/gdb/dwarf2/read-debug-names.c
@@ -396,7 +396,7 @@ mapped_debug_names_reader::scan_all_names ()
if (parent_it == entry_pool_offsets_to_entries.cend ())
{
- complaint (_ ("Parent entry not found for .debug_names entry"));
+ complaint (_("Parent entry not found for .debug_names entry"));
continue;
}
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index e97eae0320f..9c978009227 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -1306,10 +1306,10 @@ check_pid_namespace_match (inferior *inf)
libthread_db. */
if (!linux_ns_same (inf->pid, LINUX_NS_PID))
{
- warning (_ ("Target and debugger are in different PID "
- "namespaces; thread lists and other data are "
- "likely unreliable. "
- "Connect to gdbserver inside the container."));
+ warning (_("Target and debugger are in different PID "
+ "namespaces; thread lists and other data are "
+ "likely unreliable. "
+ "Connect to gdbserver inside the container."));
}
}
}
diff --git a/gdb/riscv-linux-tdep.c b/gdb/riscv-linux-tdep.c
index 05f92f832eb..45e7ba611b7 100644
--- a/gdb/riscv-linux-tdep.c
+++ b/gdb/riscv-linux-tdep.c
@@ -515,7 +515,7 @@ riscv_linux_get_syscall_number (struct gdbarch *gdbarch, thread_info *thread)
if (regcache->cooked_read (RISCV_A7_REGNUM, &ret)
!= register_status::REG_VALID)
{
- warning (_ ("Can not read a7 register"));
+ warning (_("Can not read a7 register"));
return -1;
}
diff --git a/gdb/source.c b/gdb/source.c
index a47176cd9a5..b932c7b0788 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -260,7 +260,7 @@ set_default_source_symtab_and_line (void)
{
if (!have_full_symbols (current_program_space)
&& !have_partial_symbols (current_program_space))
- error (_ ("No symbol table is loaded. Use the \"file\" command."));
+ error (_("No symbol table is loaded. Use the \"file\" command."));
/* Pull in a current source symtab if necessary. */
current_source_location *loc = get_source_location (current_program_space);
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 85827cf3d49..d2c9bb1950d 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -1059,7 +1059,7 @@ symbol_file_add_with_addrs (const gdb_bfd_ref_ptr &abfd, const char *name,
|| ((have_full_symbols (current_program_space)
|| have_partial_symbols (current_program_space))
&& mainline))
- && !query (_ ("Load new symbol table from \"%s\"? "), name))
+ && !query (_("Load new symbol table from \"%s\"? "), name))
error (_("Not confirmed."));
if (mainline)
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 90bcce2348e..cc6dbcf7aab 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -4537,7 +4537,7 @@ info_sources_command (const char *args, int from_tty)
{
if (!have_full_symbols (current_program_space)
&& !have_partial_symbols (current_program_space))
- error (_ ("No symbol table is loaded. Use the \"file\" command."));
+ error (_("No symbol table is loaded. Use the \"file\" command."));
filename_partial_match_opts match_opts;
auto group = make_info_sources_options_def_group (&match_opts);
diff --git a/gdb/top.c b/gdb/top.c
index f5b9fdc3034..dc22a3f58fb 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -1575,7 +1575,7 @@ This GDB was configured as follows:\n\
"), DEBUGDIR, DEBUGDIR_RELOCATABLE ? " (relocatable)" : "");
#ifdef ADDITIONAL_DEBUG_DIRS
- gdb_printf (stream, _ ("\
+ gdb_printf (stream, _("\
--with-additional-debug-dirs=%s\n\
"), ADDITIONAL_DEBUG_DIRS);
#endif
More information about the Gdb-cvs
mailing list