Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH 00/10] [gdb] Add some missing i18n support
@ 2026-06-07  6:00 Tom de Vries
  2026-06-07  6:00 ` [PATCH 01/10] [gdb] Add missing i18n support to error strings (part 1) Tom de Vries
                   ` (10 more replies)
  0 siblings, 11 replies; 17+ messages in thread
From: Tom de Vries @ 2026-06-07  6:00 UTC (permalink / raw)
  To: gdb-patches

I used a Claude Code session to identify spots in the GDB source code that are
missing i18n support.

I wrote patches to fix these, all but two using sed scripts.

I ignored internal_error and internal_warning calls, because I think their
strings don't classify as user-visible strings.

I also ignored calls like gdb_printf (gdb_stdlog, "Warning: ...").  I wonder
if these need to be rewritten to use warning ("...") instead.

Tested on x86_64-linux.

Tom de Vries (10):
  [gdb] Add missing i18n support to error strings (part 1)
  [gdb] Add missing i18n support to error strings (part 2)
  [gdb] Add missing i18n support to error strings (part 3)
  [gdb] Add missing i18n support to error strings (part 4)
  [gdb] Add missing i18n support to errors strings (part 5)
  [gdb] Add missing i18n support to warning strings (part 1)
  [gdb] Add missing i18n support to warning strings (part 2)
  [gdb] Add missing i18n support to warning strings (part 3)
  [gdb] Add missing i18n support to warning strings (part 4)
  [gdb] Add missing i18n support to warning strings (part 5)

 gdb/break-cond-parse.c         | 12 +++----
 gdb/cli/cli-style.c            |  4 +--
 gdb/elfread.c                  |  4 +--
 gdb/f-array-walker.h           |  4 +--
 gdb/f-lang.c                   |  2 +-
 gdb/f-valprint.c               |  2 +-
 gdb/mi/mi-parse.c              |  8 ++---
 gdb/nat/fork-inferior.c        |  6 ++--
 gdb/ppc-sysv-tdep.c            |  4 +--
 gdb/procfs.c                   |  4 +--
 gdb/s390-tdep.c                |  4 +--
 gdb/solib-rocm.c               |  4 +--
 gdb/symtab.c                   |  4 +--
 gdb/valarith.c                 |  2 +-
 gdb/windows-nat.c              |  8 ++---
 gdbserver/linux-low.cc         | 36 ++++++++++-----------
 gdbserver/linux-tic6x-low.cc   |  2 +-
 gdbserver/linux-x86-low.cc     |  2 +-
 gdbserver/mem-break.cc         | 14 ++++----
 gdbserver/netbsd-low.cc        | 12 +++----
 gdbserver/regcache.cc          |  2 +-
 gdbserver/remote-utils.cc      | 14 ++++----
 gdbserver/server.cc            | 14 ++++----
 gdbserver/thread-db.cc         | 14 ++++----
 gdbserver/tracepoint.cc        | 58 +++++++++++++++++-----------------
 gdbserver/win32-aarch64-low.cc |  2 +-
 gdbserver/win32-i386-low.cc    |  2 +-
 gdbserver/win32-low.cc         |  8 ++---
 28 files changed, 126 insertions(+), 126 deletions(-)


base-commit: 0a6aadacb2e9a2695c82635dd8b2f7fccf537adf
-- 
2.51.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 01/10] [gdb] Add missing i18n support to error strings (part 1)
  2026-06-07  6:00 [PATCH 00/10] [gdb] Add some missing i18n support Tom de Vries
@ 2026-06-07  6:00 ` Tom de Vries
  2026-06-07  6:00 ` [PATCH 02/10] [gdb] Add missing i18n support to error strings (part 2) Tom de Vries
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 17+ messages in thread
From: Tom de Vries @ 2026-06-07  6:00 UTC (permalink / raw)
  To: gdb-patches

Add missing i18n support to some error strings.

Result of:
...
$ find gdb* -type f \
    | egrep -v /testsuite/ \
    | xargs sed -i \
          's/\([ \t]\)error (\("[^"]*"\));/\1error (_(\2));/'
...
---
 gdb/break-cond-parse.c    | 12 ++++++------
 gdb/f-array-walker.h      |  4 ++--
 gdb/f-lang.c              |  2 +-
 gdb/f-valprint.c          |  2 +-
 gdb/mi/mi-parse.c         |  8 ++++----
 gdb/valarith.c            |  2 +-
 gdbserver/mem-break.cc    |  2 +-
 gdbserver/remote-utils.cc |  4 ++--
 gdbserver/server.cc       | 10 +++++-----
 gdbserver/tracepoint.cc   | 14 +++++++-------
 gdbserver/win32-low.cc    |  4 ++--
 11 files changed, 32 insertions(+), 32 deletions(-)

diff --git a/gdb/break-cond-parse.c b/gdb/break-cond-parse.c
index 7cb70df378c..f552c171c05 100644
--- a/gdb/break-cond-parse.c
+++ b/gdb/break-cond-parse.c
@@ -485,9 +485,9 @@ create_breakpoint_parse_arg_string
 	case token::type::THREAD:
 	  {
 	    if (thread != -1)
-	      error ("You can specify only one thread.");
+	      error (_("You can specify only one thread."));
 	    if (task != -1 || inferior != -1)
-	      error ("You can specify only one of thread, inferior, or task.");
+	      error (_("You can specify only one of thread, inferior, or task."));
 	    const char *tmptok;
 	    thread_info *thr = parse_thread_id (tok_value.c_str (), &tmptok);
 	    gdb_assert (*tmptok == '\0');
@@ -497,9 +497,9 @@ create_breakpoint_parse_arg_string
 	case token::type::INFERIOR:
 	  {
 	    if (inferior != -1)
-	      error ("You can specify only one inferior.");
+	      error (_("You can specify only one inferior."));
 	    if (task != -1 || thread != -1)
-	      error ("You can specify only one of thread, inferior, or task.");
+	      error (_("You can specify only one of thread, inferior, or task."));
 	    char *tmptok;
 	    long inferior_id = strtol (tok_value.c_str (), &tmptok, 0);
 	    if (*tmptok != '\0')
@@ -515,9 +515,9 @@ create_breakpoint_parse_arg_string
 	case token::type::TASK:
 	  {
 	    if (task != -1)
-	      error ("You can specify only one task.");
+	      error (_("You can specify only one task."));
 	    if (inferior != -1 || thread != -1)
-	      error ("You can specify only one of thread, inferior, or task.");
+	      error (_("You can specify only one of thread, inferior, or task."));
 	    char *tmptok;
 	    long task_id = strtol (tok_value.c_str (), &tmptok, 0);
 	    if (*tmptok != '\0')
diff --git a/gdb/f-array-walker.h b/gdb/f-array-walker.h
index c743d59c47a..bb8cb0ca599 100644
--- a/gdb/f-array-walker.h
+++ b/gdb/f-array-walker.h
@@ -42,7 +42,7 @@ class fortran_array_offset_calculator
     /* Get the range, and extract the bounds.  */
     struct type *range_type = type->index_type ();
     if (!get_discrete_bounds (range_type, &m_lowerbound, &m_upperbound))
-      error ("unable to read array bounds");
+      error (_("unable to read array bounds"));
 
     /* Figure out the stride for this array.  */
     struct type *elt_type = check_typedef (type->target_type ());
@@ -221,7 +221,7 @@ class fortran_array_walker
     struct type *range_type = check_typedef (type)->index_type ();
     LONGEST lowerbound, upperbound;
     if (!get_discrete_bounds (range_type, &lowerbound, &upperbound))
-      error ("failed to get range bounds");
+      error (_("failed to get range bounds"));
 
     /* CALC is used to calculate the offsets for each element in this
        dimension.  */
diff --git a/gdb/f-lang.c b/gdb/f-lang.c
index e2a34b22ba3..90062734b0e 100644
--- a/gdb/f-lang.c
+++ b/gdb/f-lang.c
@@ -1981,7 +1981,7 @@ fortran_adjust_dynamic_array_base_address_hack (struct type *type,
       struct type *range_type = tmp_type->index_type ();
       LONGEST lowerbound, upperbound, stride;
       if (!get_discrete_bounds (range_type, &lowerbound, &upperbound))
-	error ("failed to get range bounds");
+	error (_("failed to get range bounds"));
 
       /* Figure out the stride for this dimension.  */
       struct type *elt_type = check_typedef (tmp_type->target_type ());
diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c
index 13921c03a48..8a383281a6c 100644
--- a/gdb/f-valprint.c
+++ b/gdb/f-valprint.c
@@ -356,7 +356,7 @@ class fortran_array_printer_impl : public fortran_array_walker_base_impl
 	struct type *range_type = check_typedef (type)->index_type ();
 	LONGEST lowerbound, upperbound;
 	if (!get_discrete_bounds (range_type, &lowerbound, &upperbound))
-	  error ("failed to get range bounds");
+	  error (_("failed to get range bounds"));
 
 	/* CALC is used to calculate the offsets for each element.  */
 	fortran_array_offset_calculator calc (type);
diff --git a/gdb/mi/mi-parse.c b/gdb/mi/mi-parse.c
index 68c56c9b57f..e0763ebf46f 100644
--- a/gdb/mi/mi-parse.c
+++ b/gdb/mi/mi-parse.c
@@ -437,28 +437,28 @@ mi_parse::mi_parse (gdb::unique_xmalloc_ptr<char> command,
 	{
 	  ++i;
 	  if (i == args.size ())
-	    error ("No argument to '--thread-group'");
+	    error (_("No argument to '--thread-group'"));
 	  this->set_thread_group (args[i].get (), nullptr);
 	}
       else if (streq (chp, "--thread"))
 	{
 	  ++i;
 	  if (i == args.size ())
-	    error ("No argument to '--thread'");
+	    error (_("No argument to '--thread'"));
 	  this->set_thread (args[i].get (), nullptr);
 	}
       else if (streq (chp, "--frame"))
 	{
 	  ++i;
 	  if (i == args.size ())
-	    error ("No argument to '--frame'");
+	    error (_("No argument to '--frame'"));
 	  this->set_frame (args[i].get (), nullptr);
 	}
       else if (streq (chp, "--language"))
 	{
 	  ++i;
 	  if (i == args.size ())
-	    error ("No argument to '--language'");
+	    error (_("No argument to '--language'"));
 	  this->set_language (args[i].get (), nullptr);
 	}
       else
diff --git a/gdb/valarith.c b/gdb/valarith.c
index ed5b5d8adf9..62a35841f1f 100644
--- a/gdb/valarith.c
+++ b/gdb/valarith.c
@@ -690,7 +690,7 @@ value_concat (struct value *arg1, struct value *arg2)
   struct type *type2 = check_typedef (arg2->type ());
 
   if (type1->code () != TYPE_CODE_ARRAY && type2->code () != TYPE_CODE_ARRAY)
-    error ("no array provided to concatenation");
+    error (_("no array provided to concatenation"));
 
   LONGEST low1, high1;
   struct type *elttype1 = type1;
diff --git a/gdbserver/mem-break.cc b/gdbserver/mem-break.cc
index 6f797ccce69..134a856a3db 100644
--- a/gdbserver/mem-break.cc
+++ b/gdbserver/mem-break.cc
@@ -751,7 +751,7 @@ reinsert_fast_tracepoint_jumps_at (CORE_ADDR where)
     }
 
   if (jp->inserted)
-    error ("Jump already inserted at reinsert time.");
+    error (_("Jump already inserted at reinsert time."));
 
   jp->inserted = 1;
 
diff --git a/gdbserver/remote-utils.cc b/gdbserver/remote-utils.cc
index d7049baf083..65452fbcdfa 100644
--- a/gdbserver/remote-utils.cc
+++ b/gdbserver/remote-utils.cc
@@ -319,7 +319,7 @@ remote_open (const char *name)
   port_str = strchr (name, ':');
 #ifdef USE_WIN32API
   if (port_str == NULL)
-    error ("Only HOST:PORT is supported on this platform.");
+    error (_("Only HOST:PORT is supported on this platform."));
 #endif
 
   if (streq (name, STDIO_CONNECTION_NAME))
@@ -1351,7 +1351,7 @@ prepare_resume_reply (char *buf, ptid_t ptid, const target_waitstatus &status)
       sprintf (buf, "N");
       break;
     default:
-      error ("unhandled waitkind");
+      error (_("unhandled waitkind"));
       break;
     }
 }
diff --git a/gdbserver/server.cc b/gdbserver/server.cc
index 37859f26b7e..b6d785a0c64 100644
--- a/gdbserver/server.cc
+++ b/gdbserver/server.cc
@@ -1252,7 +1252,7 @@ handle_search_memory (char *own_buf, int packet_len)
 
   pattern = (gdb_byte *) malloc (packet_len);
   if (pattern == NULL)
-    error ("Unable to allocate memory to perform the search");
+    error (_("Unable to allocate memory to perform the search"));
 
   if (decode_search_memory_packet (own_buf + cmd_name_len,
 				   packet_len - cmd_name_len,
@@ -1260,7 +1260,7 @@ handle_search_memory (char *own_buf, int packet_len)
 				   pattern, &pattern_len) < 0)
     {
       free (pattern);
-      error ("Error in parsing qSearch:memory packet");
+      error (_("Error in parsing qSearch:memory packet"));
     }
 
   auto read_memory = [] (CORE_ADDR addr, gdb_byte *result, size_t len)
@@ -1561,7 +1561,7 @@ parse_debug_options (const char *options)
       std::string opt (options, end - options);
 
       if (opt.size () == 0)
-	error ("invalid empty debug option");
+	error (_("invalid empty debug option"));
 
       bool is_opt_all = opt == "all";
 
@@ -4588,7 +4588,7 @@ captured_main (int argc, char *argv[])
   else if (pid != 0)
     {
       if (attach_inferior (pid) == -1)
-	error ("Attaching not supported on this target");
+	error (_("Attaching not supported on this target"));
 
       /* Otherwise succeeded.  */
     }
@@ -4614,7 +4614,7 @@ captured_main (int argc, char *argv[])
     was_running = true;
 
   if (!was_running && !multi_mode)
-    error ("No program to debug");
+    error (_("No program to debug"));
 
   while (1)
     {
diff --git a/gdbserver/tracepoint.cc b/gdbserver/tracepoint.cc
index 25a3e8ceadf..60c8926bb8b 100644
--- a/gdbserver/tracepoint.cc
+++ b/gdbserver/tracepoint.cc
@@ -2910,7 +2910,7 @@ install_fast_tracepoint (struct tracepoint *tpoint, char *errbuf)
   if (read_inferior_data_pointer (ipa_sym_addrs.addr_gdb_collect_ptr,
 				  &collect))
     {
-      error ("error extracting gdb_collect_ptr");
+      error (_("error extracting gdb_collect_ptr"));
       return 1;
     }
 
@@ -3026,7 +3026,7 @@ cmd_qtstart (char *packet)
       /* Tell IPA about the correct tdesc.  */
       if (write_inferior_integer (ipa_sym_addrs.addr_ipa_tdesc_idx,
 				  target_get_ipa_tdesc_idx ()))
-	error ("Error setting ipa_tdesc_idx variable in lib");
+	error (_("Error setting ipa_tdesc_idx variable in lib"));
     }
 
   /* Start out empty.  */
@@ -3152,13 +3152,13 @@ cmd_qtstart (char *packet)
       stop_tracing_bkpt = set_breakpoint_at (ipa_sym_addrs.addr_stop_tracing,
 					     stop_tracing_handler);
       if (stop_tracing_bkpt == NULL)
-	error ("Error setting stop_tracing breakpoint");
+	error (_("Error setting stop_tracing breakpoint"));
 
       flush_trace_buffer_bkpt
 	= set_breakpoint_at (ipa_sym_addrs.addr_flush_trace_buffer,
 			     flush_trace_buffer_handler);
       if (flush_trace_buffer_bkpt == NULL)
-	error ("Error setting flush_trace_buffer breakpoint");
+	error (_("Error setting flush_trace_buffer breakpoint"));
     }
 
   target_unpause_all (true);
@@ -5444,7 +5444,7 @@ get_raw_reg_func_addr (void)
   CORE_ADDR res;
   if (read_inferior_data_pointer (ipa_sym_addrs.addr_get_raw_reg_ptr, &res))
     {
-      error ("error extracting get_raw_reg_ptr");
+      error (_("error extracting get_raw_reg_ptr"));
       return 0;
     }
   return res;
@@ -5457,7 +5457,7 @@ get_get_tsv_func_addr (void)
   if (read_inferior_data_pointer (
 	ipa_sym_addrs.addr_get_trace_state_variable_value_ptr, &res))
     {
-      error ("error extracting get_trace_state_variable_value_ptr");
+      error (_("error extracting get_trace_state_variable_value_ptr"));
       return 0;
     }
   return res;
@@ -5470,7 +5470,7 @@ get_set_tsv_func_addr (void)
   if (read_inferior_data_pointer (
 	ipa_sym_addrs.addr_set_trace_state_variable_value_ptr, &res))
     {
-      error ("error extracting set_trace_state_variable_value_ptr");
+      error (_("error extracting set_trace_state_variable_value_ptr"));
       return 0;
     }
   return res;
diff --git a/gdbserver/win32-low.cc b/gdbserver/win32-low.cc
index 6f1cf5ed025..5ffab38e6ee 100644
--- a/gdbserver/win32-low.cc
+++ b/gdbserver/win32-low.cc
@@ -310,7 +310,7 @@ do_initial_child_stuff (HANDLE proch, DWORD pid, int attached)
   if (windows_process.wow64_process
       && (Wow64GetThreadContext == nullptr
 	  || Wow64SetThreadContext == nullptr))
-    error ("WOW64 debugging is not supported on this system.\n");
+    error (_("WOW64 debugging is not supported on this system.\n"));
 
   windows_process.ignore_first_breakpoint
     = !attached && windows_process.wow64_process;
@@ -517,7 +517,7 @@ win32_process_target::create_inferior (const char *program,
   windows_process.attaching = 0;
 
   if (!program)
-    error ("No executable specified, specify executable to debug.\n");
+    error (_("No executable specified, specify executable to debug.\n"));
 
   flags = DEBUG_PROCESS | DEBUG_ONLY_THIS_PROCESS;
 
-- 
2.51.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 02/10] [gdb] Add missing i18n support to error strings (part 2)
  2026-06-07  6:00 [PATCH 00/10] [gdb] Add some missing i18n support Tom de Vries
  2026-06-07  6:00 ` [PATCH 01/10] [gdb] Add missing i18n support to error strings (part 1) Tom de Vries
@ 2026-06-07  6:00 ` Tom de Vries
  2026-06-09 16:56   ` Tom Tromey
  2026-06-07  6:00 ` [PATCH 03/10] [gdb] Add missing i18n support to error strings (part 3) Tom de Vries
                   ` (8 subsequent siblings)
  10 siblings, 1 reply; 17+ messages in thread
From: Tom de Vries @ 2026-06-07  6:00 UTC (permalink / raw)
  To: gdb-patches

Add missing i18n support to some error strings.

Result of:
...
$ find gdb* -type f -name "*.[ch]" -o -name "*.cc" \
    | egrep -v /testsuite/ \
    | xargs sed -i \
        '/"[ \t]*%s[ \t]*"/b l;s/\([ \t]\)error (\("[^"]*"\),$/\1error (_(\2),/;:l'
...
---
 gdb/procfs.c            | 2 +-
 gdbserver/thread-db.cc  | 4 ++--
 gdbserver/tracepoint.cc | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/gdb/procfs.c b/gdb/procfs.c
index 7472c10616e..fd5d1a76bd6 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -599,7 +599,7 @@ static void
 proc_error (procinfo *pi, const char *func, int line)
 {
   int saved_errno = errno;
-  error ("procfs: %s line %d, %s: %s",
+  error (_("procfs: %s line %d, %s: %s"),
 	 func, line, pi->pathname, safe_strerror (saved_errno));
 }
 
diff --git a/gdbserver/thread-db.cc b/gdbserver/thread-db.cc
index 0bdcda2ced8..fd78ee8a208 100644
--- a/gdbserver/thread-db.cc
+++ b/gdbserver/thread-db.cc
@@ -178,13 +178,13 @@ find_one_thread (ptid_t ptid)
   td_err_e err = thread_db->td_ta_map_lwp2thr_p (thread_db->thread_agent, lwpid,
 						 &th);
   if (err != TD_OK)
-    error ("Cannot get thread handle for LWP %d: %s",
+    error (_("Cannot get thread handle for LWP %d: %s"),
 	   lwpid, thread_db_err_str (err));
 
   td_thrinfo_t ti;
   err = thread_db->td_thr_get_info_p (&th, &ti);
   if (err != TD_OK)
-    error ("Cannot get thread info for LWP %d: %s",
+    error (_("Cannot get thread info for LWP %d: %s"),
 	   lwpid, thread_db_err_str (err));
 
   threads_debug_printf ("Found thread %ld (LWP %d)",
diff --git a/gdbserver/tracepoint.cc b/gdbserver/tracepoint.cc
index 60c8926bb8b..3d3f0776fc0 100644
--- a/gdbserver/tracepoint.cc
+++ b/gdbserver/tracepoint.cc
@@ -6047,7 +6047,7 @@ upload_fast_traceframes (void)
 	      if (read_inferior_memory (tf
 					+ offsetof (struct traceframe, data),
 					block, ipa_tframe.data_size))
-		error ("Uploading: Couldn't read traceframe data at %s\n",
+		error (_("Uploading: Couldn't read traceframe data at %s\n"),
 		       paddress (tf + offsetof (struct traceframe, data)));
 	    }
 
-- 
2.51.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 03/10] [gdb] Add missing i18n support to error strings (part 3)
  2026-06-07  6:00 [PATCH 00/10] [gdb] Add some missing i18n support Tom de Vries
  2026-06-07  6:00 ` [PATCH 01/10] [gdb] Add missing i18n support to error strings (part 1) Tom de Vries
  2026-06-07  6:00 ` [PATCH 02/10] [gdb] Add missing i18n support to error strings (part 2) Tom de Vries
@ 2026-06-07  6:00 ` Tom de Vries
  2026-06-07  6:00 ` [PATCH 04/10] [gdb] Add missing i18n support to error strings (part 4) Tom de Vries
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 17+ messages in thread
From: Tom de Vries @ 2026-06-07  6:00 UTC (permalink / raw)
  To: gdb-patches

Add missing i18n support to some error strings.

Result of:
...
$ find gdb* -type f -name "*.[ch]" -o -name "*.cc" \
    | egrep -v /testsuite/ \
    | xargs sed -i \
        '/"[ \t]*%s[ \t]*"/b l;s/\([ \t]\)error (\("[^"]*"\)\([^)]*\));/\1error (_(\2)\3);/;:l'
...
---
 gdbserver/linux-low.cc       | 2 +-
 gdbserver/linux-tic6x-low.cc | 2 +-
 gdbserver/netbsd-low.cc      | 4 ++--
 gdbserver/remote-utils.cc    | 4 ++--
 gdbserver/server.cc          | 2 +-
 gdbserver/tracepoint.cc      | 4 ++--
 6 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc
index b4ec524dbbf..117b67afda2 100644
--- a/gdbserver/linux-low.cc
+++ b/gdbserver/linux-low.cc
@@ -5182,7 +5182,7 @@ register_addr (const struct usrregs_info *usrregs, int regnum)
   int addr;
 
   if (regnum < 0 || regnum >= usrregs->num_regs)
-    error ("Invalid register number %d.", regnum);
+    error (_("Invalid register number %d."), regnum);
 
   addr = usrregs->regmap[regnum];
 
diff --git a/gdbserver/linux-tic6x-low.cc b/gdbserver/linux-tic6x-low.cc
index 9470ca690a0..eff1186a079 100644
--- a/gdbserver/linux-tic6x-low.cc
+++ b/gdbserver/linux-tic6x-low.cc
@@ -373,7 +373,7 @@ tic6x_target::low_arch_setup ()
       feature = C6X_C6XP;
       break;
     default:
-      error ("Unknown CPU ID 0x%02x", cpuid);
+      error (_("Unknown CPU ID 0x%02x"), cpuid);
     }
   tic6x_usrregs_info.regmap = tic6x_regmap;
 
diff --git a/gdbserver/netbsd-low.cc b/gdbserver/netbsd-low.cc
index 5e3826ca6a8..8462c5d3180 100644
--- a/gdbserver/netbsd-low.cc
+++ b/gdbserver/netbsd-low.cc
@@ -1134,13 +1134,13 @@ elf_64_file_p (const char *file)
     perror_with_name (("read"));
   gdb::close (fd);
   if (ret != sizeof (header))
-    error ("Cannot read ELF file header: %s", file);
+    error (_("Cannot read ELF file header: %s"), file);
 
   if (header.e_ident[EI_MAG0] != ELFMAG0
       || header.e_ident[EI_MAG1] != ELFMAG1
       || header.e_ident[EI_MAG2] != ELFMAG2
       || header.e_ident[EI_MAG3] != ELFMAG3)
-    error ("Unrecognized ELF file header: %s", file);
+    error (_("Unrecognized ELF file header: %s"), file);
 
   return header.e_ident[EI_CLASS] == ELFCLASS64;
 }
diff --git a/gdbserver/remote-utils.cc b/gdbserver/remote-utils.cc
index 65452fbcdfa..f505d85206e 100644
--- a/gdbserver/remote-utils.cc
+++ b/gdbserver/remote-utils.cc
@@ -574,7 +574,7 @@ read_ptid (const char *buf, const char **obuf)
       /* Multi-process ptid.  */
       pp = unpack_varlen_hex (p + 1, &hex);
       if (pp == (p + 1) || *pp != '.')
-	error ("invalid remote ptid: %s\n", buf);
+	error (_("invalid remote ptid: %s\n"), buf);
 
       pid = (ptid_t::pid_type) (LONGEST) hex;
       if (hex != ((ULONGEST) pid))
@@ -583,7 +583,7 @@ read_ptid (const char *buf, const char **obuf)
       p = pp + 1;
       hex = hex_or_minus_one (p, &pp);
       if (pp == p)
-	error ("invalid remote ptid: %s\n", buf);
+	error (_("invalid remote ptid: %s\n"), buf);
 
       lwp = (ptid_t::lwp_type) (LONGEST) hex;
       if (hex != ((ULONGEST) lwp))
diff --git a/gdbserver/server.cc b/gdbserver/server.cc
index b6d785a0c64..f732616bba8 100644
--- a/gdbserver/server.cc
+++ b/gdbserver/server.cc
@@ -305,7 +305,7 @@ attach_inferior (int pid)
      0 if it succeeded, and call error() otherwise.  */
 
   if (find_process_pid (pid) != nullptr)
-    error ("Already attached to process %d\n", pid);
+    error (_("Already attached to process %d\n"), pid);
 
   if (myattach (pid) != 0)
     return -1;
diff --git a/gdbserver/tracepoint.cc b/gdbserver/tracepoint.cc
index 3d3f0776fc0..f5f29300949 100644
--- a/gdbserver/tracepoint.cc
+++ b/gdbserver/tracepoint.cc
@@ -537,7 +537,7 @@ tracepoint_action_send (char *buffer, const struct tracepoint_action *action)
     case 'X':
       return x_tracepoint_action_send (buffer, action);
     }
-  error ("Unknown trace action '%c'.", action->type);
+  error (_("Unknown trace action '%c'."), action->type);
 }
 
 static CORE_ADDR
@@ -552,7 +552,7 @@ tracepoint_action_download (const struct tracepoint_action *action)
     case 'X':
       return x_tracepoint_action_download (action);
     }
-  error ("Unknown trace action '%c'.", action->type);
+  error (_("Unknown trace action '%c'."), action->type);
 }
 #endif
 
-- 
2.51.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 04/10] [gdb] Add missing i18n support to error strings (part 4)
  2026-06-07  6:00 [PATCH 00/10] [gdb] Add some missing i18n support Tom de Vries
                   ` (2 preceding siblings ...)
  2026-06-07  6:00 ` [PATCH 03/10] [gdb] Add missing i18n support to error strings (part 3) Tom de Vries
@ 2026-06-07  6:00 ` Tom de Vries
  2026-06-07  6:00 ` [PATCH 05/10] [gdb] Add missing i18n support to errors strings (part 5) Tom de Vries
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 17+ messages in thread
From: Tom de Vries @ 2026-06-07  6:00 UTC (permalink / raw)
  To: gdb-patches

Add missing i18n support to some error strings.

Result of:
...
$ find gdb* -type f -name "*.[ch]" -o -name "*.cc" \
    | egrep -v /testsuite/ \
    | xargs sed -i \
        '/"[ \t]*%s[ \t]*"/b l;s/\([ \t]\)error (\("[^"]*"\)\(.*\));/\1error (_(\2)\3);/;:l'
...
---
 gdbserver/linux-low.cc         | 4 ++--
 gdbserver/server.cc            | 2 +-
 gdbserver/thread-db.cc         | 4 ++--
 gdbserver/tracepoint.cc        | 2 +-
 gdbserver/win32-aarch64-low.cc | 2 +-
 gdbserver/win32-i386-low.cc    | 2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc
index 117b67afda2..d3a8a7c1f85 100644
--- a/gdbserver/linux-low.cc
+++ b/gdbserver/linux-low.cc
@@ -1173,7 +1173,7 @@ linux_process_target::attach (unsigned long pid)
       this->remove_linux_process (proc);
 
       std::string reason = linux_ptrace_attach_fail_reason_string (ptid, err);
-      error ("Cannot attach to process %ld: %s", pid, reason.c_str ());
+      error (_("Cannot attach to process %ld: %s"), pid, reason.c_str ());
     }
 
   open_proc_mem_file (proc);
@@ -5280,7 +5280,7 @@ linux_process_target::store_register (const usrregs_info *usrregs,
 
 
 	  if (!low_cannot_store_register (regno))
-	    error ("writing register %d: %s", regno, safe_strerror (errno));
+	    error (_("writing register %d: %s"), regno, safe_strerror (errno));
 	}
       regaddr += sizeof (PTRACE_XFER_TYPE);
     }
diff --git a/gdbserver/server.cc b/gdbserver/server.cc
index f732616bba8..baccdf00172 100644
--- a/gdbserver/server.cc
+++ b/gdbserver/server.cc
@@ -1576,7 +1576,7 @@ parse_debug_options (const char *options)
 	  }
 
       if (!found)
-	error ("unknown debug option '%s'", opt.c_str ());
+	error (_("unknown debug option '%s'"), opt.c_str ());
 
       options = (*end == ',') ? end + 1 : end;
     }
diff --git a/gdbserver/thread-db.cc b/gdbserver/thread-db.cc
index fd78ee8a208..24b7c84d907 100644
--- a/gdbserver/thread-db.cc
+++ b/gdbserver/thread-db.cc
@@ -274,7 +274,7 @@ find_new_threads_callback (const td_thrhandle_t *th_p, void *data)
 
   err = thread_db->td_thr_get_info_p (th_p, &ti);
   if (err != TD_OK)
-    error ("Cannot get thread info: %s", thread_db_err_str (err));
+    error (_("Cannot get thread info: %s"), thread_db_err_str (err));
 
   if (ti.ti_lid == -1)
     {
@@ -343,7 +343,7 @@ thread_db_find_new_threads (void)
 	}
     }
   if (err != TD_OK)
-    error ("Cannot find new threads: %s", thread_db_err_str (err));
+    error (_("Cannot find new threads: %s"), thread_db_err_str (err));
 }
 
 /* Cache all future symbols that thread_db might request.  We can not
diff --git a/gdbserver/tracepoint.cc b/gdbserver/tracepoint.cc
index f5f29300949..9ffab6c24e4 100644
--- a/gdbserver/tracepoint.cc
+++ b/gdbserver/tracepoint.cc
@@ -6016,7 +6016,7 @@ upload_fast_traceframes (void)
 
       if (read_inferior_memory (tf, (unsigned char *) &ipa_tframe,
 				offsetof (struct traceframe, data)))
-	error ("Uploading: couldn't read traceframe at %s\n", paddress (tf));
+	error (_("Uploading: couldn't read traceframe at %s\n"), paddress (tf));
 
       if (ipa_tframe.tpnum == 0)
 	{
diff --git a/gdbserver/win32-aarch64-low.cc b/gdbserver/win32-aarch64-low.cc
index ac8c117d6e7..17f64906df4 100644
--- a/gdbserver/win32-aarch64-low.cc
+++ b/gdbserver/win32-aarch64-low.cc
@@ -175,7 +175,7 @@ aarch64_get_thread_context (windows_thread_info *th)
   if (!ret)
     {
       DWORD e = GetLastError ();
-      error ("GetThreadContext failure %ld\n", (long) e);
+      error (_("GetThreadContext failure %ld\n"), (long) e);
     }
 }
 
diff --git a/gdbserver/win32-i386-low.cc b/gdbserver/win32-i386-low.cc
index 15addd9175d..1aacd302074 100644
--- a/gdbserver/win32-i386-low.cc
+++ b/gdbserver/win32-i386-low.cc
@@ -265,7 +265,7 @@ i386_get_thread_context (windows_thread_info *th)
 	      goto again;
 	    }
 
-	  error ("GetThreadContext failure %ld\n", (long) e);
+	  error (_("GetThreadContext failure %ld\n"), (long) e);
 	}
     });
 }
-- 
2.51.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 05/10] [gdb] Add missing i18n support to errors strings (part 5)
  2026-06-07  6:00 [PATCH 00/10] [gdb] Add some missing i18n support Tom de Vries
                   ` (3 preceding siblings ...)
  2026-06-07  6:00 ` [PATCH 04/10] [gdb] Add missing i18n support to error strings (part 4) Tom de Vries
@ 2026-06-07  6:00 ` Tom de Vries
  2026-06-07  6:00 ` [PATCH 06/10] [gdb] Add missing i18n support to warning strings (part 1) Tom de Vries
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 17+ messages in thread
From: Tom de Vries @ 2026-06-07  6:00 UTC (permalink / raw)
  To: gdb-patches

Add missing i18n support to some multi-line error strings.
---
 gdb/solib-rocm.c       | 4 ++--
 gdbserver/win32-low.cc | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/gdb/solib-rocm.c b/gdb/solib-rocm.c
index 34cb2bb9e57..3a58a46d886 100644
--- a/gdb/solib-rocm.c
+++ b/gdb/solib-rocm.c
@@ -731,8 +731,8 @@ rocm_solib_ops::bfd_open (const char *pathname) const
 	  if (amd_dbgapi_architecture_get_info
 	      (architecture_id, AMD_DBGAPI_ARCHITECTURE_INFO_NAME,
 	       sizeof (arch_name), &arch_name) != AMD_DBGAPI_STATUS_SUCCESS)
-	    error ("amd_dbgapi_architecture_get_info call failed for arch "
-		   "%#02x.", gfx_arch);
+	    error (_("amd_dbgapi_architecture_get_info call failed for arch "
+		     "%#02x."), gfx_arch);
 	  gdb::unique_xmalloc_ptr<char> arch_name_cleaner (arch_name);
 
 	  error (_("'%s': AMDGCN architecture %s not supported."),
diff --git a/gdbserver/win32-low.cc b/gdbserver/win32-low.cc
index 5ffab38e6ee..1931c66871f 100644
--- a/gdbserver/win32-low.cc
+++ b/gdbserver/win32-low.cc
@@ -796,8 +796,8 @@ resume_one_thread (thread_info *thread, bool step, gdb_signal sig,
 	  if (the_low_target.single_step != NULL)
 	    (*the_low_target.single_step) (th);
 	  else
-	    error ("Single stepping is not supported "
-		   "in this configuration.\n");
+	    error (_("Single stepping is not supported "
+		     "in this configuration.\n"));
 	}
 
       win32_set_thread_context (th);
-- 
2.51.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 06/10] [gdb] Add missing i18n support to warning strings (part 1)
  2026-06-07  6:00 [PATCH 00/10] [gdb] Add some missing i18n support Tom de Vries
                   ` (4 preceding siblings ...)
  2026-06-07  6:00 ` [PATCH 05/10] [gdb] Add missing i18n support to errors strings (part 5) Tom de Vries
@ 2026-06-07  6:00 ` Tom de Vries
  2026-06-07  6:00 ` [PATCH 07/10] [gdb] Add missing i18n support to warning strings (part 2) Tom de Vries
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 17+ messages in thread
From: Tom de Vries @ 2026-06-07  6:00 UTC (permalink / raw)
  To: gdb-patches

Add missing i18n support to some warning strings.

Result of:
...
$ find gdb* -type f -name "*.[ch]" -o -name "*.cc" \
    | egrep -v /testsuite/ \
    | xargs sed -i \
        's/\([ \t]\)warning (\("[^"]*"\));/\1warning (_(\2));/'
...
---
 gdb/elfread.c           |  4 ++--
 gdb/nat/fork-inferior.c |  2 +-
 gdbserver/linux-low.cc  |  4 ++--
 gdbserver/mem-break.cc  | 12 ++++++------
 gdbserver/thread-db.cc  |  2 +-
 gdbserver/tracepoint.cc |  6 +++---
 6 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/gdb/elfread.c b/gdb/elfread.c
index 7e2f4fe8f3f..fd4d045d27a 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -1281,10 +1281,10 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
      an included file XCOFF info is useless.  */
 
   if (ei.mdebugsect)
-    warning ("mdebug debug information is not supported.");
+    warning (_("mdebug debug information is not supported."));
 
   if (ei.stabsect)
-    warning ("stabs debug information is not supported.");
+    warning (_("stabs debug information is not supported."));
 
   /* Read the CTF section only if there is no DWARF info.  */
   if (always_read_ctf && ei.ctfsect)
diff --git a/gdb/nat/fork-inferior.c b/gdb/nat/fork-inferior.c
index e25eb778d34..8718d2d43de 100644
--- a/gdb/nat/fork-inferior.c
+++ b/gdb/nat/fork-inferior.c
@@ -526,7 +526,7 @@ trace_start_error (const char *fmt, ...)
   va_list ap;
 
   va_start (ap, fmt);
-  warning ("Could not trace the inferior process.");
+  warning (_("Could not trace the inferior process."));
   vwarning (fmt, ap);
   va_end (ap);
 
diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc
index d3a8a7c1f85..ac1cf8ca4b3 100644
--- a/gdbserver/linux-low.cc
+++ b/gdbserver/linux-low.cc
@@ -4077,7 +4077,7 @@ linux_process_target::resume_one_lwp_throw (lwp_info *lwp, int step,
 	  if (fast_tp_collecting == fast_tpoint_collect_result::not_collecting)
 	    {
 	      if (step == 0)
-		warning ("BAD - reinserting but not stepping.");
+		warning (_("BAD - reinserting but not stepping."));
 	      if (lwp->suspended)
 		warning ("BAD - reinserting and suspended(%d).",
 				 lwp->suspended);
@@ -5894,7 +5894,7 @@ linux_process_target::async (bool enable)
 	    {
 	      gdb_sigmask (SIG_UNBLOCK, &mask, NULL);
 
-	      warning ("creating event pipe failed.");
+	      warning (_("creating event pipe failed."));
 	      return previous;
 	    }
 
diff --git a/gdbserver/mem-break.cc b/gdbserver/mem-break.cc
index 134a856a3db..4e944ff1df2 100644
--- a/gdbserver/mem-break.cc
+++ b/gdbserver/mem-break.cc
@@ -604,7 +604,7 @@ delete_fast_tracepoint_jump (struct fast_tracepoint_jump *todel)
 	}
     }
 
-  warning ("Could not find fast tracepoint jump in list.");
+  warning (_("Could not find fast tracepoint jump in list."));
   return ENOENT;
 }
 
@@ -902,7 +902,7 @@ delete_raw_breakpoint (struct process_info *proc, struct raw_breakpoint *todel)
 	}
     }
 
-  warning ("Could not find raw breakpoint in list.");
+  warning (_("Could not find raw breakpoint in list."));
   return ENOENT;
 }
 
@@ -956,7 +956,7 @@ delete_breakpoint_1 (struct process_info *proc, struct breakpoint *todel)
 	}
     }
 
-  warning ("Could not find breakpoint in list.");
+  warning (_("Could not find breakpoint in list."));
   return ENOENT;
 }
 
@@ -1206,7 +1206,7 @@ add_breakpoint_condition (struct gdb_breakpoint *bp, const char **condition)
 
   if (cond == NULL)
     {
-      warning ("Condition evaluation failed. Assuming unconditional.");
+      warning (_("Condition evaluation failed. Assuming unconditional."));
       return 0;
     }
 
@@ -1305,7 +1305,7 @@ add_breakpoint_commands (struct gdb_breakpoint *bp, const char **command,
 
   if (cmd == NULL)
     {
-      warning ("Command evaluation failed. Disabling.");
+      warning (_("Command evaluation failed. Disabling."));
       return 0;
     }
 
@@ -1653,7 +1653,7 @@ check_breakpoints (CORE_ADDR stop_pc)
 	{
 	  if (!raw->inserted)
 	    {
-	      warning ("Hit a removed breakpoint?");
+	      warning (_("Hit a removed breakpoint?"));
 	      return;
 	    }
 
diff --git a/gdbserver/thread-db.cc b/gdbserver/thread-db.cc
index 24b7c84d907..96ad2ae28d0 100644
--- a/gdbserver/thread-db.cc
+++ b/gdbserver/thread-db.cc
@@ -884,5 +884,5 @@ thread_db_notice_clone (thread_info *parent_thr, ptid_t child_ptid)
   switch_to_thread (parent_thr);
 
   if (!find_one_thread (child_ptid))
-    warning ("Cannot find thread after clone.");
+    warning (_("Cannot find thread after clone."));
 }
diff --git a/gdbserver/tracepoint.cc b/gdbserver/tracepoint.cc
index 9ffab6c24e4..e86d3dc0c20 100644
--- a/gdbserver/tracepoint.cc
+++ b/gdbserver/tracepoint.cc
@@ -5197,7 +5197,7 @@ fast_tracepoint_collecting (CORE_ADDR thread_area,
       tpoint = fast_tracepoint_from_jump_pad_address (stop_pc);
       if (tpoint == NULL)
 	{
-	  warning ("in jump pad, but no matching tpoint?");
+	  warning (_("in jump pad, but no matching tpoint?"));
 	  return fast_tpoint_collect_result::not_collecting;
 	}
       else
@@ -5225,7 +5225,7 @@ fast_tracepoint_collecting (CORE_ADDR thread_area,
       tpoint = fast_tracepoint_from_trampoline_address (stop_pc);
       if (tpoint == NULL)
 	{
-	  warning ("in trampoline, but no matching tpoint?");
+	  warning (_("in trampoline, but no matching tpoint?"));
 	  return fast_tpoint_collect_result::not_collecting;
 	}
       else
@@ -6279,7 +6279,7 @@ gdb_agent_helper_thread (void *arg)
 
       if (listen_fd == -1)
 	{
-	  warning ("could not create sync socket");
+	  warning (_("could not create sync socket"));
 	  break;
 	}
 
-- 
2.51.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 07/10] [gdb] Add missing i18n support to warning strings (part 2)
  2026-06-07  6:00 [PATCH 00/10] [gdb] Add some missing i18n support Tom de Vries
                   ` (5 preceding siblings ...)
  2026-06-07  6:00 ` [PATCH 06/10] [gdb] Add missing i18n support to warning strings (part 1) Tom de Vries
@ 2026-06-07  6:00 ` Tom de Vries
  2026-06-07  6:00 ` [PATCH 08/10] [gdb] Add missing i18n support to warning strings (part 3) Tom de Vries
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 17+ messages in thread
From: Tom de Vries @ 2026-06-07  6:00 UTC (permalink / raw)
  To: gdb-patches

Add missing i18n support to some warning strings.

Result of:
...
$ find gdb* -type f -name "*.[ch]" -o -name "*.cc" \
    | egrep -v /testsuite/ \
    | xargs sed -i \
        '/"[ \t]*%s[ \t]*"/b l;s/\([ \t]\)warning (\("[^"]*"\)\([^)]*\));/\1warning (_(\2)\3);/;:l'
...
---
 gdb/nat/fork-inferior.c    | 2 +-
 gdbserver/linux-low.cc     | 6 +++---
 gdbserver/linux-x86-low.cc | 2 +-
 gdbserver/remote-utils.cc  | 2 +-
 gdbserver/tracepoint.cc    | 4 ++--
 5 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/gdb/nat/fork-inferior.c b/gdb/nat/fork-inferior.c
index 8718d2d43de..6d5d8b36d38 100644
--- a/gdb/nat/fork-inferior.c
+++ b/gdb/nat/fork-inferior.c
@@ -368,7 +368,7 @@ fork_inferior (const char *exec_file, const std::string &allargs, char **env,
 
       /* If we get here, it's an error.  */
       save_errno = errno;
-      warning ("Cannot exec %s", argv[0]);
+      warning (_("Cannot exec %s"), argv[0]);
 
       for (i = 1; argv[i] != NULL; i++)
 	warning (" %s", argv[i]);
diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc
index ac1cf8ca4b3..8a467ce508e 100644
--- a/gdbserver/linux-low.cc
+++ b/gdbserver/linux-low.cc
@@ -532,9 +532,9 @@ linux_process_target::handle_extended_wait (lwp_info **orig_event_lwp,
 	  if (ret == -1)
 	    perror_with_name ("waiting for new child");
 	  else if (ret != new_pid)
-	    warning ("wait returned unexpected PID %d", ret);
+	    warning (_("wait returned unexpected PID %d"), ret);
 	  else if (!WIFSTOPPED (status))
-	    warning ("wait returned unexpected status 0x%x", status);
+	    warning (_("wait returned unexpected status 0x%x"), status);
 	}
 
       if (debug_threads)
@@ -6745,7 +6745,7 @@ linux_process_target::qxfer_libraries_svr4 (const char *annex,
 
 	  if (r_version < 1)
 	    {
-	      warning ("unexpected r_debug version %d", r_version);
+	      warning (_("unexpected r_debug version %d"), r_version);
 	      break;
 	    }
 
diff --git a/gdbserver/linux-x86-low.cc b/gdbserver/linux-x86-low.cc
index 28a3d78f747..906191e04f4 100644
--- a/gdbserver/linux-x86-low.cc
+++ b/gdbserver/linux-x86-low.cc
@@ -1663,7 +1663,7 @@ x86_target::get_min_fast_tracepoint_insn_len ()
 	     mention that something has gone awry.  */
 	  if (!warned_about_fast_tracepoints)
 	    {
-	      warning ("4-byte fast tracepoints not available; %s", errbuf);
+	      warning (_("4-byte fast tracepoints not available; %s"), errbuf);
 	      warned_about_fast_tracepoints = 1;
 	    }
 	  return 5;
diff --git a/gdbserver/remote-utils.cc b/gdbserver/remote-utils.cc
index f505d85206e..b7ab200392e 100644
--- a/gdbserver/remote-utils.cc
+++ b/gdbserver/remote-utils.cc
@@ -1618,7 +1618,7 @@ look_up_one_symbol (const char *name, CORE_ADDR *addrp, int may_ask_gdb)
 
   if (!startswith (cs.own_buf, "qSymbol:"))
     {
-      warning ("Malformed response to qSymbol, ignoring: %s", cs.own_buf);
+      warning (_("Malformed response to qSymbol, ignoring: %s"), cs.own_buf);
       return -1;
     }
 
diff --git a/gdbserver/tracepoint.cc b/gdbserver/tracepoint.cc
index e86d3dc0c20..de661a7ceb1 100644
--- a/gdbserver/tracepoint.cc
+++ b/gdbserver/tracepoint.cc
@@ -6190,7 +6190,7 @@ init_named_socket (const char *name)
 
   if (strlen (name) >= ARRAY_SIZE (addr.sun_path))
     {
-      warning ("socket name too long for sockaddr_un::sun_path field: %s", name);
+      warning (_("socket name too long for sockaddr_un::sun_path field: %s"), name);
       return -1;
     }
 
@@ -6207,7 +6207,7 @@ init_named_socket (const char *name)
 	  close (fd);
 	  return -1;
 	}
-      warning ("socket %s already exists; overwriting", name);
+      warning (_("socket %s already exists; overwriting"), name);
     }
 
   result = bind (fd, (struct sockaddr *) &addr, sizeof (addr));
-- 
2.51.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 08/10] [gdb] Add missing i18n support to warning strings (part 3)
  2026-06-07  6:00 [PATCH 00/10] [gdb] Add some missing i18n support Tom de Vries
                   ` (6 preceding siblings ...)
  2026-06-07  6:00 ` [PATCH 07/10] [gdb] Add missing i18n support to warning strings (part 2) Tom de Vries
@ 2026-06-07  6:00 ` Tom de Vries
  2026-06-07  6:00 ` [PATCH 09/10] [gdb] Add missing i18n support to warning strings (part 4) Tom de Vries
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 17+ messages in thread
From: Tom de Vries @ 2026-06-07  6:00 UTC (permalink / raw)
  To: gdb-patches

Add missing i18n support to some warning strings.

Result of:
...
$ find gdb* -type f -name "*.[ch]" -o -name "*.cc"
    | egrep -v /testsuite/ \
    | xargs sed -i \
        '/"[ \t]*%s[ \t]*"/b l;s/\([ \t]\)warning (\("[^"]*"\),$/\1warning (_(\2),/;:l'
...
---
 gdb/procfs.c              |  2 +-
 gdb/symtab.c              |  4 ++--
 gdb/windows-nat.c         |  4 ++--
 gdbserver/linux-low.cc    | 12 ++++++------
 gdbserver/netbsd-low.cc   |  4 ++--
 gdbserver/regcache.cc     |  2 +-
 gdbserver/remote-utils.cc |  4 ++--
 gdbserver/thread-db.cc    |  4 ++--
 gdbserver/tracepoint.cc   |  4 ++--
 9 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/gdb/procfs.c b/gdb/procfs.c
index fd5d1a76bd6..25319464bc8 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -589,7 +589,7 @@ static void
 proc_warn (procinfo *pi, const char *func, int line)
 {
   int saved_errno = errno;
-  warning ("procfs: %s line %d, %ps: %s",
+  warning (_("procfs: %s line %d, %ps: %s"),
 	   func, line, styled_string (file_name_style.style (),
 				      pi->pathname),
 	   safe_strerror (saved_errno));
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 3c10e1fd750..9fde2e6e6c9 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -2976,7 +2976,7 @@ find_sal_for_pc_sect (CORE_ADDR pc, struct obj_section *section, int notcurrent)
 	   * so of course we can't find the real func/line info,
 	   * but the "break" still works, and the warning is annoying.
 	   * So I commented out the warning.  RT */
-	  /* warning ("In stub for %s; unable to find real function/line info",
+	  /* warning (_("In stub for %s; unable to find real function/line info"),
 	     msymbol->linkage_name ()); */
 	  ;
 	/* fall through */
@@ -2984,7 +2984,7 @@ find_sal_for_pc_sect (CORE_ADDR pc, struct obj_section *section, int notcurrent)
 		 == msymbol.value_address ())
 	  /* Avoid infinite recursion */
 	  /* See above comment about why warning is commented out.  */
-	  /* warning ("In stub for %s; unable to find real function/line info",
+	  /* warning (_("In stub for %s; unable to find real function/line info"),
 	     msymbol->linkage_name ()); */
 	  ;
 	/* fall through */
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index d9e924f16c6..89d65ff3e7e 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -379,11 +379,11 @@ wait_for_single (HANDLE handle, DWORD howlong)
       if (r == WAIT_FAILED)
 	{
 	  unsigned err = (unsigned) GetLastError ();
-	  warning ("WaitForSingleObject failed (code %u): %s",
+	  warning (_("WaitForSingleObject failed (code %u): %s"),
 		   err, strwinerror (err));
 	}
       else
-	warning ("unexpected result from WaitForSingleObject: %u",
+	warning (_("unexpected result from WaitForSingleObject: %u"),
 		 (unsigned) r);
     }
 }
diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc
index 8a467ce508e..05dbed239c8 100644
--- a/gdbserver/linux-low.cc
+++ b/gdbserver/linux-low.cc
@@ -4079,7 +4079,7 @@ linux_process_target::resume_one_lwp_throw (lwp_info *lwp, int step,
 	      if (step == 0)
 		warning (_("BAD - reinserting but not stepping."));
 	      if (lwp->suspended)
-		warning ("BAD - reinserting and suspended(%d).",
+		warning (_("BAD - reinserting and suspended(%d)."),
 				 lwp->suspended);
 	    }
 	}
@@ -6606,7 +6606,7 @@ read_link_map (std::string &document, CORE_ADDR lmid, CORE_ADDR lm_addr,
 
       if (lm_prev != l_prev)
 	{
-	  warning ("Corrupted shared library list: 0x%s != 0x%s",
+	  warning (_("Corrupted shared library list: 0x%s != 0x%s"),
 		   paddress (lm_prev), paddress (l_prev));
 	  break;
 	}
@@ -6738,7 +6738,7 @@ linux_process_target::qxfer_libraries_svr4 (const char *annex,
 				 (unsigned char *) &r_version,
 				 sizeof (r_version)) != 0)
 	    {
-	      warning ("unable to read r_version from 0x%s",
+	      warning (_("unable to read r_version from 0x%s"),
 		       paddress (r_debug + lmo->r_version_offset));
 	      break;
 	    }
@@ -6752,7 +6752,7 @@ linux_process_target::qxfer_libraries_svr4 (const char *annex,
 	  if (read_one_ptr (r_debug + lmo->r_map_offset, &lm_addr,
 			    ptr_size) != 0)
 	    {
-	      warning ("unable to read r_map from 0x%s",
+	      warning (_("unable to read r_map from 0x%s"),
 		       paddress (r_debug + lmo->r_map_offset));
 	      break;
 	    }
@@ -6776,7 +6776,7 @@ linux_process_target::qxfer_libraries_svr4 (const char *annex,
 	      if (read_one_ptr (lm_addr + lmo->l_next_offset,
 				&lm_addr, ptr_size) != 0)
 		{
-		  warning ("unable to read l_next from 0x%s",
+		  warning (_("unable to read l_next from 0x%s"),
 			   paddress (lm_addr + lmo->l_next_offset));
 		  break;
 		}
@@ -6790,7 +6790,7 @@ linux_process_target::qxfer_libraries_svr4 (const char *annex,
 	  if (read_one_ptr (r_debug + lmo->r_next_offset, &r_debug,
 			    ptr_size) != 0)
 	    {
-	      warning ("unable to read r_next from 0x%s",
+	      warning (_("unable to read r_next from 0x%s"),
 		       paddress (r_debug + lmo->r_next_offset));
 	      break;
 	    }
diff --git a/gdbserver/netbsd-low.cc b/gdbserver/netbsd-low.cc
index 8462c5d3180..6cd98911c5f 100644
--- a/gdbserver/netbsd-low.cc
+++ b/gdbserver/netbsd-low.cc
@@ -1029,7 +1029,7 @@ netbsd_qxfer_libraries_svr4 (const pid_t pid, const char *annex,
 	{
 	  CORE_ADDR map_offset = r_debug + lmo->r_map_offset;
 	  if (read_one_ptr (pid, map_offset, &lm_addr, ptr_size) != 0)
-	    warning ("unable to read r_map from %s",
+	    warning (_("unable to read r_map from %s"),
 		     core_addr_to_string (map_offset));
 	}
     }
@@ -1050,7 +1050,7 @@ netbsd_qxfer_libraries_svr4 (const pid_t pid, const char *annex,
     {
       if (lm_prev != l_prev)
 	{
-	  warning ("Corrupted shared library list: 0x%lx != 0x%lx",
+	  warning (_("Corrupted shared library list: 0x%lx != 0x%lx"),
 		   (long) lm_prev, (long) l_prev);
 	  break;
 	}
diff --git a/gdbserver/regcache.cc b/gdbserver/regcache.cc
index 4ace68869e5..7e1fd9a82e0 100644
--- a/gdbserver/regcache.cc
+++ b/gdbserver/regcache.cc
@@ -206,7 +206,7 @@ registers_from_string (struct regcache *regcache, char *buf)
 
   if (len != tdesc->registers_size * 2)
     {
-      warning ("Wrong sized register packet (expected %d bytes, got %d)",
+      warning (_("Wrong sized register packet (expected %d bytes, got %d)"),
 	       2 * tdesc->registers_size, len);
       if (len > tdesc->registers_size * 2)
 	len = tdesc->registers_size * 2;
diff --git a/gdbserver/remote-utils.cc b/gdbserver/remote-utils.cc
index b7ab200392e..4a35e5c41b6 100644
--- a/gdbserver/remote-utils.cc
+++ b/gdbserver/remote-utils.cc
@@ -1751,14 +1751,14 @@ relocate_instruction (CORE_ADDR *to, CORE_ADDR oldloc)
 
   if (cs.own_buf[0] == 'E')
     {
-      warning ("An error occurred while relocating an instruction: %s",
+      warning (_("An error occurred while relocating an instruction: %s"),
 	       cs.own_buf);
       return -1;
     }
 
   if (!startswith (cs.own_buf, "qRelocInsn:"))
     {
-      warning ("Malformed response to qRelocInsn, ignoring: %s",
+      warning (_("Malformed response to qRelocInsn, ignoring: %s"),
 	       cs.own_buf);
       return -1;
     }
diff --git a/gdbserver/thread-db.cc b/gdbserver/thread-db.cc
index 96ad2ae28d0..af39a58154e 100644
--- a/gdbserver/thread-db.cc
+++ b/gdbserver/thread-db.cc
@@ -192,7 +192,7 @@ find_one_thread (ptid_t ptid)
 
   if (lwpid != ti.ti_lid)
     {
-      warning ("PID mismatch!  Expected %ld, got %ld",
+      warning (_("PID mismatch!  Expected %ld, got %ld"),
 	       (long) lwpid, (long) ti.ti_lid);
       return 0;
     }
@@ -227,7 +227,7 @@ attach_thread (const td_thrhandle_t *th_p, td_thrinfo_t *ti_p)
     {
       std::string reason = linux_ptrace_attach_fail_reason_string (ptid, err);
 
-      warning ("Could not attach to thread %ld (LWP %d): %s",
+      warning (_("Could not attach to thread %ld (LWP %d): %s"),
 	       (unsigned long) ti_p->ti_tid, ti_p->ti_lid, reason.c_str ());
 
       return 0;
diff --git a/gdbserver/tracepoint.cc b/gdbserver/tracepoint.cc
index de661a7ceb1..570208c82d4 100644
--- a/gdbserver/tracepoint.cc
+++ b/gdbserver/tracepoint.cc
@@ -6303,7 +6303,7 @@ gdb_agent_helper_thread (void *arg)
 
 	  if (fd < 0)
 	    {
-	      warning ("Accept returned %d, error: %s",
+	      warning (_("Accept returned %d, error: %s"),
 		       fd, safe_strerror (errno));
 	      break;
 	    }
@@ -6315,7 +6315,7 @@ gdb_agent_helper_thread (void *arg)
 
 	  if (ret == -1)
 	    {
-	      warning ("reading socket (fd=%d) failed with %s",
+	      warning (_("reading socket (fd=%d) failed with %s"),
 		       fd, safe_strerror (errno));
 	      close (fd);
 	      break;
-- 
2.51.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 09/10] [gdb] Add missing i18n support to warning strings (part 4)
  2026-06-07  6:00 [PATCH 00/10] [gdb] Add some missing i18n support Tom de Vries
                   ` (7 preceding siblings ...)
  2026-06-07  6:00 ` [PATCH 08/10] [gdb] Add missing i18n support to warning strings (part 3) Tom de Vries
@ 2026-06-07  6:00 ` Tom de Vries
  2026-06-09 17:00   ` Tom Tromey
  2026-06-07  6:00 ` [PATCH 10/10] [gdb] Add missing i18n support to warning strings (part 5) Tom de Vries
  2026-06-09 17:01 ` [PATCH 00/10] [gdb] Add some missing i18n support Tom Tromey
  10 siblings, 1 reply; 17+ messages in thread
From: Tom de Vries @ 2026-06-07  6:00 UTC (permalink / raw)
  To: gdb-patches

Add missing i18n support to some warning strings.

Result of:
...
$ find gdb* -type f -name "*.[ch]" -o -name "*.cc" \
    | egrep -v /testsuite/ \
    | xargs sed -i \
        '/"[ \t]*%s[ \t]*"/b l;s/\([ \t]\)warning (\("[^"]*"\)\(.*\));/\1warning (_(\2)\3);/;:l'
...
---
 gdb/nat/fork-inferior.c | 2 +-
 gdbserver/linux-low.cc  | 4 ++--
 gdbserver/tracepoint.cc | 8 ++++----
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/gdb/nat/fork-inferior.c b/gdb/nat/fork-inferior.c
index 6d5d8b36d38..1c125881496 100644
--- a/gdb/nat/fork-inferior.c
+++ b/gdb/nat/fork-inferior.c
@@ -373,7 +373,7 @@ fork_inferior (const char *exec_file, const std::string &allargs, char **env,
       for (i = 1; argv[i] != NULL; i++)
 	warning (" %s", argv[i]);
 
-      warning ("Error: %s", safe_strerror (save_errno));
+      warning (_("Error: %s"), safe_strerror (save_errno));
 
       _exit (0177);
     }
diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc
index 05dbed239c8..06d2e7a4510 100644
--- a/gdbserver/linux-low.cc
+++ b/gdbserver/linux-low.cc
@@ -6709,13 +6709,13 @@ linux_process_target::qxfer_libraries_svr4 (const char *annex,
   else
     {
       if (lm_prev != 0)
-	warning ("ignoring prev=0x%s without start", paddress (lm_prev));
+	warning (_("ignoring prev=0x%s without start"), paddress (lm_prev));
 
       /* We could interpret LMID as 'provide only the libraries for this
 	 namespace' but GDB is currently only providing lmid, start, and
 	 prev, or nothing.  */
       if (lmid != 0)
-	warning ("ignoring lmid=0x%s without start", paddress (lmid));
+	warning (_("ignoring lmid=0x%s without start"), paddress (lmid));
 
       CORE_ADDR r_debug = priv->r_debug;
       if (r_debug == 0)
diff --git a/gdbserver/tracepoint.cc b/gdbserver/tracepoint.cc
index 570208c82d4..6b58b2ac10b 100644
--- a/gdbserver/tracepoint.cc
+++ b/gdbserver/tracepoint.cc
@@ -6182,7 +6182,7 @@ init_named_socket (const char *name)
   result = fd = socket (PF_UNIX, SOCK_STREAM, 0);
   if (result == -1)
     {
-      warning ("socket creation failed: %s", safe_strerror (errno));
+      warning (_("socket creation failed: %s"), safe_strerror (errno));
       return -1;
     }
 
@@ -6203,7 +6203,7 @@ init_named_socket (const char *name)
       result = unlink (name);
       if (result == -1)
 	{
-	  warning ("unlink failed: %s", safe_strerror (errno));
+	  warning (_("unlink failed: %s"), safe_strerror (errno));
 	  close (fd);
 	  return -1;
 	}
@@ -6213,7 +6213,7 @@ init_named_socket (const char *name)
   result = bind (fd, (struct sockaddr *) &addr, sizeof (addr));
   if (result == -1)
     {
-      warning ("bind failed: %s", safe_strerror (errno));
+      warning (_("bind failed: %s"), safe_strerror (errno));
       close (fd);
       return -1;
     }
@@ -6221,7 +6221,7 @@ init_named_socket (const char *name)
   result = listen (fd, 1);
   if (result == -1)
     {
-      warning ("listen: %s", safe_strerror (errno));
+      warning (_("listen: %s"), safe_strerror (errno));
       close (fd);
       return -1;
     }
-- 
2.51.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 10/10] [gdb] Add missing i18n support to warning strings (part 5)
  2026-06-07  6:00 [PATCH 00/10] [gdb] Add some missing i18n support Tom de Vries
                   ` (8 preceding siblings ...)
  2026-06-07  6:00 ` [PATCH 09/10] [gdb] Add missing i18n support to warning strings (part 4) Tom de Vries
@ 2026-06-07  6:00 ` Tom de Vries
  2026-06-09 17:01 ` [PATCH 00/10] [gdb] Add some missing i18n support Tom Tromey
  10 siblings, 0 replies; 17+ messages in thread
From: Tom de Vries @ 2026-06-07  6:00 UTC (permalink / raw)
  To: gdb-patches

Add missing i18n support to some multi-line warning strings.
---
 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;
 }
-- 
2.51.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 02/10] [gdb] Add missing i18n support to error strings (part 2)
  2026-06-07  6:00 ` [PATCH 02/10] [gdb] Add missing i18n support to error strings (part 2) Tom de Vries
@ 2026-06-09 16:56   ` Tom Tromey
  2026-06-10  6:10     ` Tom de Vries
  0 siblings, 1 reply; 17+ messages in thread
From: Tom Tromey @ 2026-06-09 16:56 UTC (permalink / raw)
  To: Tom de Vries; +Cc: gdb-patches

>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:

Tom> $ find gdb* -type f -name "*.[ch]" -o -name "*.cc" \

I wonder if including '*.[yl]' in here would find anything else.

Tom

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 09/10] [gdb] Add missing i18n support to warning strings (part 4)
  2026-06-07  6:00 ` [PATCH 09/10] [gdb] Add missing i18n support to warning strings (part 4) Tom de Vries
@ 2026-06-09 17:00   ` Tom Tromey
  0 siblings, 0 replies; 17+ messages in thread
From: Tom Tromey @ 2026-06-09 17:00 UTC (permalink / raw)
  To: Tom de Vries; +Cc: gdb-patches

>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:

Tom> -      warning ("Error: %s", safe_strerror (save_errno));
Tom> +      warning (_("Error: %s"), safe_strerror (save_errno));

I've noticed in this series that gdb has some question warning text but
this one seems pretty contradictory :)

Tom

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 00/10] [gdb] Add some missing i18n support
  2026-06-07  6:00 [PATCH 00/10] [gdb] Add some missing i18n support Tom de Vries
                   ` (9 preceding siblings ...)
  2026-06-07  6:00 ` [PATCH 10/10] [gdb] Add missing i18n support to warning strings (part 5) Tom de Vries
@ 2026-06-09 17:01 ` Tom Tromey
  2026-06-10  7:03   ` Tom de Vries
  10 siblings, 1 reply; 17+ messages in thread
From: Tom Tromey @ 2026-06-09 17:01 UTC (permalink / raw)
  To: Tom de Vries; +Cc: gdb-patches

>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:

Tom> I ignored internal_error and internal_warning calls, because I think their
Tom> strings don't classify as user-visible strings.

Agreed.

Tom> I also ignored calls like gdb_printf (gdb_stdlog, "Warning: ...").  I wonder
Tom> if these need to be rewritten to use warning ("...") instead.

I think so.

This all looks good to me.  Thanks for doing it.
Approved-By: Tom Tromey <tom@tromey.com>

Tom

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 02/10] [gdb] Add missing i18n support to error strings (part 2)
  2026-06-09 16:56   ` Tom Tromey
@ 2026-06-10  6:10     ` Tom de Vries
  0 siblings, 0 replies; 17+ messages in thread
From: Tom de Vries @ 2026-06-10  6:10 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb-patches

On 6/9/26 6:56 PM, Tom Tromey wrote:
>>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
> 
> Tom> $ find gdb* -type f -name "*.[ch]" -o -name "*.cc" \
> 
> I wonder if including '*.[yl]' in here would find anything else.
> 

Those do contain quite a few error calls indeed.

I did a grep in those files, but didn't find any missing annotations.

Thanks,
- Tom

> Tom


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 00/10] [gdb] Add some missing i18n support
  2026-06-09 17:01 ` [PATCH 00/10] [gdb] Add some missing i18n support Tom Tromey
@ 2026-06-10  7:03   ` Tom de Vries
  2026-06-10 13:21     ` Tom Tromey
  0 siblings, 1 reply; 17+ messages in thread
From: Tom de Vries @ 2026-06-10  7:03 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb-patches

On 6/9/26 7:01 PM, Tom Tromey wrote:
> Tom> I also ignored calls like gdb_printf (gdb_stdlog, "Warning: ...").  I wonder
> Tom> if these need to be rewritten to use warning ("...") instead.
> 
> I think so.
> 

It would move the warnings from gdb_stdlog to gdb_stderr though.

In utils.h we find:
...
/* Serious error notifications.  This bypasses the pager, if one is in 

    use.  */
#define gdb_stderr (current_gdb_stderr ())
/* Log/debug/trace messages that bypasses the pager, if one is in 

    use.  */
#define gdb_stdlog (current_gdb_stdlog ())
...

So maybe these are "unserious" warnings, and need to stay on gdb_stdlog?

Thanks,
- Tom

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 00/10] [gdb] Add some missing i18n support
  2026-06-10  7:03   ` Tom de Vries
@ 2026-06-10 13:21     ` Tom Tromey
  0 siblings, 0 replies; 17+ messages in thread
From: Tom Tromey @ 2026-06-10 13:21 UTC (permalink / raw)
  To: Tom de Vries; +Cc: Tom Tromey, gdb-patches

Tom> So maybe these are "unserious" warnings, and need to stay on gdb_stdlog?

I doubt that much thought went into them.  At least in cli-decode the
"Warning:" text dates back to the very early days.

Tom

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2026-06-10 13:23 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-07  6:00 [PATCH 00/10] [gdb] Add some missing i18n support Tom de Vries
2026-06-07  6:00 ` [PATCH 01/10] [gdb] Add missing i18n support to error strings (part 1) Tom de Vries
2026-06-07  6:00 ` [PATCH 02/10] [gdb] Add missing i18n support to error strings (part 2) Tom de Vries
2026-06-09 16:56   ` Tom Tromey
2026-06-10  6:10     ` Tom de Vries
2026-06-07  6:00 ` [PATCH 03/10] [gdb] Add missing i18n support to error strings (part 3) Tom de Vries
2026-06-07  6:00 ` [PATCH 04/10] [gdb] Add missing i18n support to error strings (part 4) Tom de Vries
2026-06-07  6:00 ` [PATCH 05/10] [gdb] Add missing i18n support to errors strings (part 5) Tom de Vries
2026-06-07  6:00 ` [PATCH 06/10] [gdb] Add missing i18n support to warning strings (part 1) Tom de Vries
2026-06-07  6:00 ` [PATCH 07/10] [gdb] Add missing i18n support to warning strings (part 2) Tom de Vries
2026-06-07  6:00 ` [PATCH 08/10] [gdb] Add missing i18n support to warning strings (part 3) Tom de Vries
2026-06-07  6:00 ` [PATCH 09/10] [gdb] Add missing i18n support to warning strings (part 4) Tom de Vries
2026-06-09 17:00   ` Tom Tromey
2026-06-07  6:00 ` [PATCH 10/10] [gdb] Add missing i18n support to warning strings (part 5) Tom de Vries
2026-06-09 17:01 ` [PATCH 00/10] [gdb] Add some missing i18n support Tom Tromey
2026-06-10  7:03   ` Tom de Vries
2026-06-10 13:21     ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox