mirror of
git://sourceware.org/git/libabigail.git
synced 2025-01-31 05:41:38 +00:00
The Git repository of the Libabigail Project
933c744034
The alternate debug info file referred to a binary can be missing, even though the rest of the debug info is not. In that case, libabigail starts loading the debug info and then it crashes when trying to get DIEs that are part of the missing alternate debug info. This patch detects when the alternate debug info is missing, so that abidiff and abipkgdiff can gracefully bail out, yielding a meaningful error message. * include/abg-dwarf-reader.h (enum abigail::dwarf_reader::status): Add a new STATUS_ALT_DEBUG_INFO_NOT_FOUND enumerator there. (refers_to_alt_debug_info): Declare new function. * src/abg-dwarf-reader.cc (read_corpus_from_elf): Detect when the referred-to alternate debug info file is not found and flip the STATUS_ALT_DEBUG_INFO_NOT_FOUND bit of the status accordingly. If the debug info was found but not the alternate debug info, then do not try to read the debug info at all. (refers_to_alt_debug_info): Define new function. * tools/abidiff.cc (handle_error): Define new static function. (main): Use it, rather than handling errors preventing libabigail from reading the corpus on a case by case basis. tools/abipkgdiff.cc (compare): Handle the case where no alternate debug info was found. * tests/data/test-diff-pkg/libxfce4ui-devel-4.12.1-8.fc27.ppc64-self-report-0.txt: New test output reference. * tests/data/test-diff-pkg/libxfce4ui-devel-4.12.1-8.fc27.ppc64.rpm: New test input RPM. * tests/data/test-diff-pkg/libxfce4ui-devel-debuginfo-4.12.1-8.fc27.ppc64.rpm: Likewise. * tests/data/Makefile.am: Add the new test files above to source distribution. * tests/test-diff-pkg.cc (in_out_specs): Add a new test case from the new input files above. Signed-off-by: Dodji Seketeli <dodji@redhat.com> |
||
---|---|---|
autoconf-archive | ||
bash-completion | ||
doc | ||
include | ||
m4 | ||
scripts | ||
src | ||
tests | ||
tools | ||
.gitignore | ||
abigail.m4 | ||
AUTHORS | ||
ChangeLog | ||
COMMIT-LOG-GUIDELINES | ||
COMPILING | ||
configure.ac | ||
CONTRIBUTING | ||
COPYING | ||
COPYING-GPLV3 | ||
COPYING-LGPLV2 | ||
COPYING-LGPLV3 | ||
default.abignore | ||
gen-changelog.py | ||
install-sh | ||
libabigail.pc.in | ||
ltmain.sh | ||
Makefile.am | ||
NEWS | ||
README | ||
release-text-template.txt | ||
VISIBILITY |
This is the Application Binary Interface Generic Analysis and Instrumentation Library. It aims at constructing, manipulating, serializing and de-serializing ABI-relevant artifacts. The set of artifacts that we are intersted is made of quantities like types, variable, fonctions and declarations of a given library or program. For a given library or program this set of quantities is called an ABI corpus. This library aims at (among other things) providing a way to compare two ABI Corpora (apparently the plural of corpus is copora, heh, that's cool), provide detailed information about their differences, and help build tools to infer interesting conclusions about these differences. You are welcome to contribute to this project after reading the files CONTRIBUTING and COMMIT-LOG-GUIDELINES files in the source tree. Communicating with the maintainers of this project -- including sending patches to be include to the source code -- happens via email at libabigail@sourceware.org.