[binutils-gdb] [gdb] Add missing i18n support to warning strings (part 5)

Tom de Vries via Gdb-cvs <[email protected]> Tue, 9 Jun 2026 20:15:02 +0000 (GMT)
Newsgroups gmane.comp.gdb.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=970570ce5ca76907b25578e70ebbf58d46721a5f

commit 970570ce5ca76907b25578e70ebbf58d46721a5f
Author: Tom de Vries <[email protected]>
Date:   Tue Jun 9 22:14:07 2026 +0200

    [gdb] Add missing i18n support to warning strings (part 5)
    
    Add missing i18n support to some multi-line warning strings.
    
    Approved-By: Tom Tromey <[email protected]>

Diff:
---
 gdb/cli/cli-style.c     |  4 ++--
 gdb/ppc-sysv-tdep.c     |  4 ++--
 gdb/s390-tdep.c         |  4 ++--
 gdb/windows-nat.c       |  4 ++--
 gdbserver/linux-low.cc  |  4 ++--
 gdbserver/netbsd-low.cc |  4 ++--
 gdbserver/tracepoint.cc | 14 +++++++-------
 7 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/gdb/cli/cli-style.c b/gdb/cli/cli-style.c
index 272e857c2a5..03a887232c7 100644
--- a/gdb/cli/cli-style.c
+++ b/gdb/cli/cli-style.c
@@ -373,8 +373,8 @@ set_style_enabled  (const char *args, int from_tty, struct cmd_list_element *c)
      appear to support styling, then warn the user.  */
   if (c == set_style_enabled_cmd && cli_styling
       && !terminal_supports_styling ())
-    warning ("The current terminal doesn't support styling.  Styled output "
-	     "might not appear as expected.");
+    warning (_("The current terminal doesn't support styling.  Styled output "
+	       "might not appear as expected."));
 
   /* It is not necessary to flush the source cache here.  The source cache
      tracks whether entries are styled or not.  */
diff --git a/gdb/ppc-sysv-tdep.c b/gdb/ppc-sysv-tdep.c
index f3507773557..e9ea789a53d 100644
--- a/gdb/ppc-sysv-tdep.c
+++ b/gdb/ppc-sysv-tdep.c
@@ -2188,8 +2188,8 @@ ppc_sysv_get_return_buf_addr (struct type *val_type,
     }
   catch (const gdb_exception_error &e)
     {
-      warning ("Cannot determine the function return value.\n"
-	       "Try compiling with -fvar-tracking.");
+      warning (_("Cannot determine the function return value.\n"
+		 "Try compiling with -fvar-tracking."));
     }
   return return_val;
 }
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index f9d7bdd04e4..72ff92055bf 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -2194,8 +2194,8 @@ s390_get_return_buf_addr (struct type *val_type,
 
   if (val_on_entry == nullptr)
     {
-      warning ("Cannot determine the function return value.\n"
-	       "Try compiling with -fvar-tracking.");
+      warning (_("Cannot determine the function return value.\n"
+		 "Try compiling with -fvar-tracking."));
       return 0;
     }
 
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index 89d65ff3e7e..a7cf8692d41 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -2076,8 +2076,8 @@ windows_nat_target::attach (const char *args, int from_tty)
   DWORD pid = parse_pid_to_attach (args);
 
   if (set_process_privilege (SE_DEBUG_NAME, TRUE) < 0)
-    warning ("Failed to get SE_DEBUG_NAME privilege\n"
-	     "This can cause attach to fail on Windows NT/2K/XP");
+    warning (_("Failed to get SE_DEBUG_NAME privilege\n"
+	       "This can cause attach to fail on Windows NT/2K/XP"));
 
   windows_process->saw_create = 0;
 
diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc
index 06d2e7a4510..ade5e9e2a1c 100644
--- a/gdbserver/linux-low.cc
+++ b/gdbserver/linux-low.cc
@@ -6309,8 +6309,8 @@ get_phdr_phnum_from_proc_auxv (const int pid, const int is_elf64,
 
   if (*phdr_memaddr == 0 || *num_phdr == 0)
     {
-      warning ("Unexpected missing AT_PHDR and/or AT_PHNUM: "
-	       "phdr_memaddr = %ld, phdr_num = %d",
+      warning (_("Unexpected missing AT_PHDR and/or AT_PHNUM: "
+		 "phdr_memaddr = %ld, phdr_num = %d"),
 	       (long) *phdr_memaddr, *num_phdr);
       return 2;
     }
diff --git a/gdbserver/netbsd-low.cc b/gdbserver/netbsd-low.cc
index 6cd98911c5f..ddbf0b97f54 100644
--- a/gdbserver/netbsd-low.cc
+++ b/gdbserver/netbsd-low.cc
@@ -776,8 +776,8 @@ int get_phdr_phnum_from_proc_auxv (const pid_t pid,
 
   if (*phdr_memaddr == 0 || *num_phdr == 0)
     {
-      warning ("Unexpected missing AT_PHDR and/or AT_PHNUM: "
-	       "phdr_memaddr = %s, phdr_num = %d",
+      warning (_("Unexpected missing AT_PHDR and/or AT_PHNUM: "
+		 "phdr_memaddr = %s, phdr_num = %d"),
 	       core_addr_to_string (*phdr_memaddr), *num_phdr);
       return 2;
     }
diff --git a/gdbserver/tracepoint.cc b/gdbserver/tracepoint.cc
index 6b58b2ac10b..1e1ca8b5e64 100644
--- a/gdbserver/tracepoint.cc
+++ b/gdbserver/tracepoint.cc
@@ -5006,8 +5006,8 @@ build_traceframe_info_xml (char blocktype, unsigned char *dataptr, void *data)
 	break;
       }
     default:
-      warning ("Unhandled trace block type (%d) '%c ' "
-	       "while building trace frame info.",
+      warning (_("Unhandled trace block type (%d) '%c ' "
+		 "while building trace frame info."),
 	       blocktype, blocktype);
       break;
     }
@@ -5281,8 +5281,8 @@ fast_tracepoint_collecting (CORE_ADDR thread_area,
 	= fast_tracepoint_from_ipa_tpoint_address (ipa_collecting_obj.tpoint);
       if (tpoint == NULL)
 	{
-	  warning ("fast_tracepoint_collecting: collecting, "
-		   "but tpoint %s not found?",
+	  warning (_("fast_tracepoint_collecting: collecting, "
+		     "but tpoint %s not found?"),
 		   paddress ((CORE_ADDR) ipa_collecting_obj.tpoint));
 	  return fast_tpoint_collect_result::not_collecting;
 	}
@@ -6246,9 +6246,9 @@ gdb_agent_socket_init (void)
 
   fd = init_named_socket (agent_socket_name);
   if (fd < 0)
-    warning ("Error initializing named socket (%s) for communication with the "
-	     "ust helper thread. Check that directory exists and that it "
-	     "is writable.", agent_socket_name);
+    warning (_("Error initializing named socket (%s) for communication with the "
+	       "ust helper thread. Check that directory exists and that it "
+	       "is writable."), agent_socket_name);
 
   return fd;
 }