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 09/10] [gdb] Add missing i18n support to warning strings (part 4)
Date: Sun,  7 Jun 2026 08:00:40 +0200	[thread overview]
Message-ID: <20260607060041.410491-10-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 \
        '/"[ \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


  parent reply	other threads:[~2026-06-07  6:06 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 ` [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 ` Tom de Vries [this message]
2026-06-09 17:00   ` [PATCH 09/10] [gdb] Add missing i18n support to warning strings (part 4) 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-10-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