]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb] Fix '_ ("foo")'
authorTom de Vries <tdevries@suse.de>
Mon, 17 Nov 2025 16:29:31 +0000 (17:29 +0100)
committerTom de Vries <tdevries@suse.de>
Mon, 17 Nov 2025 16:29:31 +0000 (17:29 +0100)
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

gdb/dwarf2/read-debug-names.c
gdb/linux-thread-db.c
gdb/riscv-linux-tdep.c
gdb/source.c
gdb/symfile.c
gdb/symtab.c
gdb/top.c

index 64f76d1b40c8f19dea46bf89f14f2db4533027d7..2ebf764880c35034547319b3ae1e94b9d2be4b15 100644 (file)
@@ -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;
            }
 
index e97eae0320fc59e804366eaf26f6d2ca0da3f22e..9c978009227004a3140e5578ec5ede065c41f38a 100644 (file)
@@ -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."));
        }
     }
 }
index 05f92f832eb23a20644c0324345696890c1321c2..45e7ba611b7191c9034c878fab65479cb26b29d7 100644 (file)
@@ -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;
     }
 
index a47176cd9a55c41fba23888594bd524335fb4137..b932c7b0788498576357192aafffa8f6c669c908 100644 (file)
@@ -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);
index 85827cf3d49c5b41dc7dd9fdd9653a2460d21cbb..d2c9bb1950dfe049a802ee11c39637475ea202ae 100644 (file)
@@ -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)
index 90bcce2348e0eb9749211d981b6de781b8b559f2..cc6dbcf7aabf0e3bff9dc36c2f4b5279d1f9bf26 100644 (file)
@@ -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);
index f5b9fdc3034684b062803cfe74a607f9ebcbe041..dc22a3f58fbf2086ad858e1dce35d6d7880e1659 100644 (file)
--- 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