From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [PATCH 07/10] [gdb] Add missing i18n support to warning strings (part 2)
Date: Sun, 7 Jun 2026 08:00:38 +0200 [thread overview]
Message-ID: <20260607060041.410491-8-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 | 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
next prev parent reply other threads:[~2026-06-07 6:03 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 ` Tom de Vries [this message]
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-8-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