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),/;:l'
...
Approved-By: Tom Tromey <tom@tromey.com>
proc_warn (procinfo *pi, const char *func, int line)
{
int saved_errno = errno;
- warning ("procfs: %s line %d, %ps: %s",
+ warning (_("procfs: %s line %d, %ps: %s"),
func, line, styled_string (file_name_style.style (),
pi->pathname),
safe_strerror (saved_errno));
* so of course we can't find the real func/line info,
* but the "break" still works, and the warning is annoying.
* So I commented out the warning. RT */
- /* warning ("In stub for %s; unable to find real function/line info",
+ /* warning (_("In stub for %s; unable to find real function/line info"),
msymbol->linkage_name ()); */
;
/* fall through */
== msymbol.value_address ())
/* Avoid infinite recursion */
/* See above comment about why warning is commented out. */
- /* warning ("In stub for %s; unable to find real function/line info",
+ /* warning (_("In stub for %s; unable to find real function/line info"),
msymbol->linkage_name ()); */
;
/* fall through */
if (r == WAIT_FAILED)
{
unsigned err = (unsigned) GetLastError ();
- warning ("WaitForSingleObject failed (code %u): %s",
+ warning (_("WaitForSingleObject failed (code %u): %s"),
err, strwinerror (err));
}
else
- warning ("unexpected result from WaitForSingleObject: %u",
+ warning (_("unexpected result from WaitForSingleObject: %u"),
(unsigned) r);
}
}
if (step == 0)
warning (_("BAD - reinserting but not stepping."));
if (lwp->suspended)
- warning ("BAD - reinserting and suspended(%d).",
+ warning (_("BAD - reinserting and suspended(%d)."),
lwp->suspended);
}
}
if (lm_prev != l_prev)
{
- warning ("Corrupted shared library list: 0x%s != 0x%s",
+ warning (_("Corrupted shared library list: 0x%s != 0x%s"),
paddress (lm_prev), paddress (l_prev));
break;
}
(unsigned char *) &r_version,
sizeof (r_version)) != 0)
{
- warning ("unable to read r_version from 0x%s",
+ warning (_("unable to read r_version from 0x%s"),
paddress (r_debug + lmo->r_version_offset));
break;
}
if (read_one_ptr (r_debug + lmo->r_map_offset, &lm_addr,
ptr_size) != 0)
{
- warning ("unable to read r_map from 0x%s",
+ warning (_("unable to read r_map from 0x%s"),
paddress (r_debug + lmo->r_map_offset));
break;
}
if (read_one_ptr (lm_addr + lmo->l_next_offset,
&lm_addr, ptr_size) != 0)
{
- warning ("unable to read l_next from 0x%s",
+ warning (_("unable to read l_next from 0x%s"),
paddress (lm_addr + lmo->l_next_offset));
break;
}
if (read_one_ptr (r_debug + lmo->r_next_offset, &r_debug,
ptr_size) != 0)
{
- warning ("unable to read r_next from 0x%s",
+ warning (_("unable to read r_next from 0x%s"),
paddress (r_debug + lmo->r_next_offset));
break;
}
{
CORE_ADDR map_offset = r_debug + lmo->r_map_offset;
if (read_one_ptr (pid, map_offset, &lm_addr, ptr_size) != 0)
- warning ("unable to read r_map from %s",
+ warning (_("unable to read r_map from %s"),
core_addr_to_string (map_offset));
}
}
{
if (lm_prev != l_prev)
{
- warning ("Corrupted shared library list: 0x%lx != 0x%lx",
+ warning (_("Corrupted shared library list: 0x%lx != 0x%lx"),
(long) lm_prev, (long) l_prev);
break;
}
if (len != tdesc->registers_size * 2)
{
- warning ("Wrong sized register packet (expected %d bytes, got %d)",
+ warning (_("Wrong sized register packet (expected %d bytes, got %d)"),
2 * tdesc->registers_size, len);
if (len > tdesc->registers_size * 2)
len = tdesc->registers_size * 2;
if (cs.own_buf[0] == 'E')
{
- warning ("An error occurred while relocating an instruction: %s",
+ warning (_("An error occurred while relocating an instruction: %s"),
cs.own_buf);
return -1;
}
if (!startswith (cs.own_buf, "qRelocInsn:"))
{
- warning ("Malformed response to qRelocInsn, ignoring: %s",
+ warning (_("Malformed response to qRelocInsn, ignoring: %s"),
cs.own_buf);
return -1;
}
if (lwpid != ti.ti_lid)
{
- warning ("PID mismatch! Expected %ld, got %ld",
+ warning (_("PID mismatch! Expected %ld, got %ld"),
(long) lwpid, (long) ti.ti_lid);
return 0;
}
{
std::string reason = linux_ptrace_attach_fail_reason_string (ptid, err);
- warning ("Could not attach to thread %ld (LWP %d): %s",
+ warning (_("Could not attach to thread %ld (LWP %d): %s"),
(unsigned long) ti_p->ti_tid, ti_p->ti_lid, reason.c_str ());
return 0;
if (fd < 0)
{
- warning ("Accept returned %d, error: %s",
+ warning (_("Accept returned %d, error: %s"),
fd, safe_strerror (errno));
break;
}
if (ret == -1)
{
- warning ("reading socket (fd=%d) failed with %s",
+ warning (_("reading socket (fd=%d) failed with %s"),
fd, safe_strerror (errno));
close (fd);
break;