From: Tom de Vries Date: Tue, 9 Jun 2026 20:14:07 +0000 (+0200) Subject: [gdb] Add missing i18n support to warning strings (part 1) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=edad26d2e813bea2828b742e9e1fc208646d758a;p=thirdparty%2Fbinutils-gdb.git [gdb] Add missing i18n support to warning strings (part 1) 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));/' ... Approved-By: Tom Tromey --- 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; }