mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-16 15:04:46 +00:00
The Git repository of the Libabigail Project
623391a040
This configure option adds the possibility to debug the type canonicalization process specifically. When this new configure option is turned on, in ir::get_canonical_type_for, when the type T, candidate for canonicalization is compared to a given canonical type C, the comparison is done twice; once using structural equality and once using canonical equality whenever it's possible. For all the sub-types of T and C, structural equality and canonical equality must yield the same result. Otherwise, an error message is emitted and the process aborts. This all happens when using the abidw program with the --enable-tc or --enable-type-canonicalization option. This has proven to be very helpful to detect type canonicalization issues. For instance, here is a trace of canonicalization issue that was detected thanks to this patch: $ build/tools/abidw --debug-tc /usr/lib64/libwiretap.so.11.0.8 structural & canonical equality different for type: function type void (wtap*) in compare_types_during_canonicalization at: /home/dodji/git/libabigail/PR28364/src/abg-ir.cc:13575: execution should not have reached this point! Abandon (core dumped) This means that right after canonicalizing the type "void (wtap*)", structural and canonical equality yield different results. So it means there is a problem with that type specifically that makes its canonicalization "go wrong". This requires further debugging to understand, but at least, we are super close to the root cause of the canonicalization problem. * configure.ac: Support the new --enable-debug-type-canonicalization option. Define macro WITH_DEBUG_TYPE_CANONICALIZATION accordingly. * doc/manuals/abidw.rst: Update documentation. * include/abg-ir.h (environment::debug_type_canonicalization_is_on): Declare new member function if WITH_DEBUG_TYPE_CANONICALIZATION is defined. * src/abg-ir-priv.h (environment::priv::{use_canonical_type_comparison_, debug_type_canonicalization_}): Define new data members if WITH_DEBUG_TYPE_CANONICALIZATION is defined. (environment::priv::priv): Initialize them. * src/abg-ir.cc (try_canonical_compare): When WITH_DEBUG_TYPE_CANONICALIZATION is defined, perform comparison using either structural or canonical equality depending on the environment::priv::use_canonical_type_comparison_ flag. (environment::debug_type_canonicalization_is_on): Define member function when WITH_DEBUG_TYPE_CANONICALIZATION is defined. (compare_types_during_canonicalization): Define new function. (type_base::get_canonical_type_for): Use the new function compare_types_during_canonicalization. * tools/abidw.cc (options::debug_type_canonicalization): Define new data member. (option::option): Initialize it. (display_usage): Add help string for --debug-tc. (parse_command_line): Support new option --debug-tc or --debug-type-canonicalization. (load_corpus_and_write_abixml): Turn type canonicalization debugging on if --enable-tc is provided. Signed-off-by: Dodji Seketeli <dodji@redhat.com> |
||
---|---|---|
autoconf-archive | ||
bash-completion | ||
doc | ||
include | ||
m4 | ||
relicensing-scripts | ||
scripts | ||
src | ||
tests | ||
tools | ||
.clang-format | ||
.gitignore | ||
abigail.m4 | ||
AUTHORS | ||
ChangeLog | ||
COMMIT-LOG-GUIDELINES | ||
COMPILING | ||
configure.ac | ||
CONTRIBUTING | ||
default.abignore | ||
gen-changelog.py | ||
install-sh | ||
libabigail.pc.in | ||
license-change-2020.txt | ||
LICENSE.txt | ||
ltmain.sh | ||
Makefile.am | ||
NEWS | ||
README | ||
release-text-template.txt | ||
update-copyright.sh | ||
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.