[PATCH 0/3] libctf: error handling improvements
Nick Alcock
nick.alcock@oracle.com
Fri Jul 31 19:16:14 GMT 2020
This does two interconnected things, done simultaneously because each touches
the same large set of source lines: gettextization, and transitioning of all
dprintfs used for error and warning handling to use the new ctf_errwarning_next
infrastructure added in the recent deduplicator series (which means changing a
lot of dprintfs into ctf_err_warns -- and also, because I changed the prototype
of ctf_err_warn, changing all the *existing* uses of that function, too).
All three patches contain a few little things that need review: the first, a
tiny reshuffling of readelf dependencies; the second, adaptation to a public API
change (of ctf_errwarning_next, which hasn't yet landed in a release, so can
change freely), some code motion allowing us to report CTF open errors, and a
bit of error-text adjustment; and the third, the removal of quote marks around
libctf API text in ld, objdump and readelf error messages, and adjustment of
testsuite output to match.
No new test failures, CTF-related test failures, or compilation warnings on
anything in the test matrix (all-targets built and tested on
x86_64-pc-linux-gnu, sparc64-unknown-linux-gnu, FreeBSD 12, Cygwin, mingw32,
mingw64). (All tested both with --disable-nls and without it.)
Nick Alcock (3):
libctf, binutils: initial work towards libctf gettextization
libctf, binutils, include, ld: gettextize and improve error handling
binutils, ld: dequote libctf error messages
binutils/Makefile.am | 2 +-
binutils/Makefile.in | 2 +-
binutils/objdump.c | 42 ++-
binutils/readelf.c | 39 ++-
include/ctf-api.h | 2 +-
ld/ldlang.c | 67 ++--
ld/testsuite/ld-ctf/ctf.exp | 11 +
ld/testsuite/ld-ctf/diag-ctf-version-f.d | 2 +-
ld/testsuite/ld-ctf/diag-cttname-invalid.d | 2 +-
.../ld-ctf/diag-decompression-failure.d | 2 +-
ld/testsuite/ld-ctf/diag-parname.d | 2 +-
ld/testsuite/ld-ctf/diag-unsupported-flag.d | 2 +-
.../ld-ctf/diag-wrong-magic-number-mixed.d | 2 +-
ld/testsuite/ld-ctf/diag-wrong-magic-number.d | 2 +-
libctf/Makefile.am | 2 +-
libctf/Makefile.in | 2 +-
libctf/configure | 28 +-
libctf/configure.ac | 2 +-
libctf/ctf-archive.c | 63 ++--
libctf/ctf-create.c | 90 ++++--
libctf/ctf-dedup.c | 290 +++++++++---------
libctf/ctf-dump.c | 27 +-
libctf/ctf-error.c | 4 +-
libctf/ctf-impl.h | 18 +-
libctf/ctf-intl.h | 68 ++++
libctf/ctf-labels.c | 6 +-
libctf/ctf-link.c | 133 ++++----
libctf/ctf-open-bfd.c | 31 +-
libctf/ctf-open.c | 59 ++--
libctf/ctf-string.c | 2 +-
libctf/ctf-subr.c | 87 +++++-
libctf/ctf-types.c | 3 +-
32 files changed, 646 insertions(+), 448 deletions(-)
create mode 100644 libctf/ctf-intl.h
--
2.28.0.248.gcf383e60c9
More information about the Binutils
mailing list