mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-30 05:42:05 +00:00
The Git repository of the Libabigail Project
876dab386e
The DWARF reader assumes that the DIEs for all member types are seen by build_class_type_and_add_to_ir(), as member type DIEs of the DIE of the class. Well that assumption is not correct because there can be errors in the DWARF we are looking at. One of these errors I stumbled accross is that a DIE for a typedef that should be a member typedef is actually a child of a *function* DIE. And that function DIE is a child of the class. Go figure. In any case, get_scope_for_die() already fixes that up and behaves as if the DIE of the typedef is a child of the DIE of the class. A side effect of this is that when build_class_type_and_add_to_ir() reads the DIE of the class, it never sees the DIE for that typedef. The takeaway of this state of affairs is that we cannot rely on build_class_type_and_add_to_ir() to update the member access specifier for member types because it does not see all member types. Rather build_ir_node_from_die() detects (reliably) that the type is a member type and updates the access specifier there. I also realize that the "is_member_type" flag of build_ir_node_from_die() and friends is useless now because inside build_ir_node_from_die() to know that that the type we are building is a member type, we just need to look at the scope and see if it's a class type. So by doing all this, this patch fixes the fact that some types were not being canonicalized because build_class_type_and_add_to_ir() was not seeing them. Ahhhh, DWARF. * include/abg-fwd.h (is_class(decl_base*)): Return a class_decl* rather than just a bool. * abg-ir.cc (is_class(decl_base*)): Return a class_decl* rather than just a bool. Simplify the implementation. * src/abg-dwarf-reader.cc (maybe_set_member_type_access_specifier): Define new static function. (build_ir_node_from_die): Remove the is_member_type flag. When building member types set their access specifier. Simplify the logic of detecting that a type is a member type; basically delegate taht to the new maybe_set_member_type_access_specifier(). (build_class_type_and_add_to_ir): Do not try to set the member type access specifiers anymore. (build_qualified_type, build_pointer_type, build_reference_type) (build_typedef_type, build_var_decl, build_function_decl): Adjust. Signed-off-by: Dodji Seketeli <dodji@redhat.com> |
||
---|---|---|
doc | ||
include | ||
m4 | ||
scripts | ||
src | ||
tests | ||
tools | ||
.gitignore | ||
abigail.m4 | ||
AUTHORS | ||
ChangeLog | ||
COMMIT-LOG-GUIDELINES | ||
COMPILING | ||
config.h.in | ||
configure.ac | ||
CONTRIBUTING | ||
COPYING | ||
COPYING-LGPLV2 | ||
COPYING-LGPLV3 | ||
gen-changelog.py | ||
install-sh | ||
libabigail.pc.in | ||
ltmain.sh | ||
Makefile.am | ||
README | ||
test21-type-suppr-0.suppr | ||
test21-type-suppr-report-0.txt |
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 comparing two ABI Corpuses, 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.