libabigail/include
Dodji Seketeli 3b6bada297 More type degradation fixes (from DWARF to abixml)
The series of fixes to make

 "abidw foo > foo.abi && abidiff foo foo.abi"
work continues.

On a binary submitted as part of bug 18904, I am still seeing type
degradation.  This patch addresses the different cases of degradation
that are happening.

	* include/abg-fwd.h (get_type_scope): Declare new function.
	* src/abg-hash.cc (var_decl:#️⃣:operator()): Do not cache the
	hash because that can alter the hash computing of a larger type
	which embeds a var decl as a member declaration.  This is
	especially true if the var decl indirectly references the larger
	type.  The only way to cache the value of a var decl would be to
	wait after all canonical types have been computed.  We'd then seal
	all types.  After that sealing happens, we can cache var decls
	starting from the top-level ones.
	(function_decl:#️⃣:operator()): Likewise.
	* src/abg-ir.cc (get_type_scope): Define new functions.
	* src/abg-reader.cc (read_is_declaration_only): Declare this
	function earlier.
	(typedef const_types_map_it): Adjust this to make it point to a
	map of string and vector of types, as opposed to a map to string
	and type as it was before.
	(typedef types_map_it): New typedef.
	(read_context::map_id_and_node): Map a type id to the last
	xmlNodePtr that represent a *declaration*.  That gives more leeway
	to the declaration resolution code to choose the right definition
	later.  Otherwise, there are cases where the wrong definition.  By
	wrong definition, I mean a definition that is different from the
	one chosen by the DWARF reading code, for a given declaration.
	Basically for a given ABI corpus, a type declaration resolve to
	the first definition seen in the corpus.
	(read_context::get_all_type_decls): Define new member function.
	(read_context::types_equal): Use qualified names only if both
	types have a scope.
	(read_context::key_type_decl): Now a given ID is associated to
	*all* the declarations and definition that have that ID.
	(read_translation_unit_from_input): Make sure the current corpus
	node points to the right node.
	(build_class_decl): Resolve class declarations to the first
	definition seen in the corpus.  Key a type decl before reading its
	members as a reading a member can request the current decl.  No
	need to try and canonicalize a member type, as build_class_decl()
	does that already.
	* tests/data/test-read-dwarf/test16-pr18904.so: New test binary
	input.
	* tests/data/test-read-dwarf/test16-pr18904.so.abi: New test
	output reference.
	* tests/test-read-dwarf.cc: Run the test above.
	* tests/data/Makefile.am: Add the new test input to source
	distribution.
	* tests/data/test-abidiff/test-PR18791-report0.txt: Adjust.
	* tests/data/test-read-dwarf/test13-pr18894.so.abi: Likewise.
	* tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise.
	* tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2015-09-02 14:15:58 +02:00
..
abg-comp-filter.h Bug 17649 Avoid endless looping on diff graph with cycles 2015-02-21 15:16:48 +01:00
abg-comparison.h Update diff stats when added symbols are removed from change report 2015-08-06 15:15:41 +02:00
abg-config.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-corpus.h Consider default symbol versions when computing added/removed fns/vars 2015-07-24 14:04:11 +02:00
abg-diff-utils.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-dwarf-reader.h Add a --stats to abidiff and abidw 2015-08-20 13:25:42 +02:00
abg-fwd.h More type degradation fixes (from DWARF to abixml) 2015-09-02 14:15:58 +02:00
abg-hash.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-ini.h Support specifying data member insertion in suppressions 2015-05-24 23:43:02 +02:00
abg-ir.h Bug 18894 - Fix representation of enumerators in abixml format 2015-08-29 17:17:48 +02:00
abg-libxml-utils.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-libzip-utils.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-reader.h Handle the life time of the map of canonical types 2015-07-09 11:12:40 +02:00
abg-sptr-utils.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-tools-utils.h Make abipkgdiff compare tar archives containing binaries 2015-08-22 14:32:20 +02:00
abg-traverse.h Canonicalize types either early or late after TU reading 2015-02-18 21:32:37 +01:00
abg-version.h.in Collapse subdir of include to include. 2013-08-14 15:07:18 +02:00
abg-viz-common.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-viz-dot.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-viz-svg.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-writer.h Update copyright years 2015-01-07 17:52:10 +01:00
Makefile.am Expose a new libabigail::tools_utils namespace 2015-01-08 12:28:14 +01:00