[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 <tom@tromey.com>
This commit is contained in:
Tom de Vries 2026-06-09 22:14:07 +02:00
parent 635572ef07
commit edad26d2e8
6 changed files with 15 additions and 15 deletions

View file

@ -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)

View file

@ -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);

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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."));
}

View file

@ -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;
}