Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [PATCH 06/10] [gdb] Add missing i18n support to warning strings (part 1)
Date: Sun,  7 Jun 2026 08:00:37 +0200	[thread overview]
Message-ID: <20260607060041.410491-7-tdevries@suse.de> (raw)
In-Reply-To: <20260607060041.410491-1-tdevries@suse.de>

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


  parent reply	other threads:[~2026-06-07  6:02 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Tom de Vries [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260607060041.410491-7-tdevries@suse.de \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox