[binutils-gdb] [gdb] Add missing i18n support to error strings (part 4)
Tom de Vries via Gdb-cvs <[email protected]> Tue, 9 Jun 2026 20:14:32 +0000 (GMT)
| Newsgroups | gmane.comp.gdb.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ca83136019f70ec8875114437e84b7a3b4fbeb14 commit ca83136019f70ec8875114437e84b7a3b4fbeb14 Author: Tom de Vries <[email protected]> Date: Tue Jun 9 22:14:07 2026 +0200 [gdb] Add missing i18n support to error strings (part 4) 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' ... Approved-By: Tom Tromey <[email protected]> Diff: --- 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); } }); }