{
if (arci->ctfi_abfd != NULL)
if (!bfd_close_all_done (arci->ctfi_abfd))
- ctf_dprintf ("Cannot close BFD: %s\n", bfd_errmsg (bfd_get_error()));
+ ctf_err_warn (NULL, 0, 0, _("cannot close BFD: %s"),
+ bfd_errmsg (bfd_get_error ()));
}
/* Open a CTF file given the specified BFD. */
if (!bfd_malloc_and_get_section (abfd, ctf_asect, &contents))
{
- ctf_dprintf ("ctf_bfdopen(): cannot malloc CTF section: %s\n",
- bfd_errmsg (bfd_get_error()));
+ ctf_err_warn (NULL, 0, 0, _("ctf_bfdopen(): cannot malloc "
+ "CTF section: %s"),
+ bfd_errmsg (bfd_get_error ()));
return (ctf_set_open_errno (errp, ECTF_FMT));
}
symcount = symhdr->sh_size / symhdr->sh_entsize;
if ((symtab = malloc (symhdr->sh_size)) == NULL)
{
- bfderrstr = "Cannot malloc symbol table";
+ bfderrstr = N_("cannot malloc symbol table");
goto err;
}
free (isymbuf);
if (isymbuf == NULL)
{
- bfderrstr = "Cannot read symbol table";
+ bfderrstr = N_("cannot read symbol table");
goto err_free_sym;
}
{
if ((strtab = bfd_elf_get_str_section (abfd, symhdr->sh_link)) == NULL)
{
- bfderrstr = "Cannot read string table";
+ bfderrstr = N_("cannot read string table");
goto err_free_sym;
}
}
err: _libctf_unused_;
if (bfderrstr)
{
- ctf_dprintf ("ctf_bfdopen(): %s: %s\n", bfderrstr,
+ ctf_err_warn (NULL, 0, 0, "ctf_bfdopen(): %s: %s", gettext (bfderrstr),
bfd_errmsg (bfd_get_error()));
ctf_set_open_errno (errp, ECTF_FMT);
}
if ((abfd = bfd_fdopenr (filename, target, nfd)) == NULL)
{
- ctf_dprintf ("Cannot open BFD from %s: %s\n",
- filename ? filename : "(unknown file)",
- bfd_errmsg (bfd_get_error()));
+ ctf_err_warn (NULL, 0, 0, _("cannot open BFD from %s: %s"),
+ filename ? filename : _("(unknown file)"),
+ bfd_errmsg (bfd_get_error ()));
return (ctf_set_open_errno (errp, ECTF_FMT));
}
bfd_set_cacheable (abfd, 1);
if (!bfd_check_format (abfd, bfd_object))
{
- ctf_dprintf ("BFD format problem in %s: %s\n",
- filename ? filename : "(unknown file)",
- bfd_errmsg (bfd_get_error()));
+ ctf_err_warn (NULL, 0, 0, _("BFD format problem in %s: %s"),
+ filename ? filename : _("(unknown file)"),
+ bfd_errmsg (bfd_get_error ()));
if (bfd_get_error() == bfd_error_file_ambiguously_recognized)
return (ctf_set_open_errno (errp, ECTF_BFD_AMBIGUOUS));
else
if ((arci = ctf_bfdopen (abfd, errp)) == NULL)
{
if (!bfd_close_all_done (abfd))
- ctf_dprintf ("Cannot close BFD: %s\n", bfd_errmsg (bfd_get_error()));
+ ctf_err_warn (NULL, 0, 0, _("cannot close BFD: %s"),
+ bfd_errmsg (bfd_get_error ()));
return NULL; /* errno is set for us. */
}
arci->ctfi_bfd_close = ctf_bfdclose;