From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [PATCH 03/10] [gdb] Add missing i18n support to error strings (part 3)
Date: Sun, 7 Jun 2026 08:00:34 +0200 [thread overview]
Message-ID: <20260607060041.410491-4-tdevries@suse.de> (raw)
In-Reply-To: <20260607060041.410491-1-tdevries@suse.de>
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
next prev 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 ` Tom de Vries [this message]
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
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-4-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