libabigail/include
Dodji Seketeli a821154753 Support virtual member functions with vtable offset not yet set
When reading C++ class informatin DWARF, it can happen that a given
virtual member function does not yet have a vtable offset.  Right now,
that offset is set to zero.  Just like a virtual member function which
actual vtable offset is zero.  So we don't make a difference between a
virtual function with no vtable offset and a virtual function with a
vtable offset set to zero.

This can lead to confusions during class comparison.

This patch fixes that problem by setting the default vtable offset to
-1.  So whenever a vtable offset is -1 it means that the virtual
member function doesn't yet have a vtable offset.

	* include/abg-fwd.h (member_function_has_vtable_offset): Declare
	new function.
	(get_member_function_vtable_offset): Return a ssize_t, not a
	size_t.
	(set_member_function_vtable_offset): Take a ssize_t, not a size_t.
	* include/abg-ir.h (class_decl::virtual_mem_fn_map_type): Adjust
	the map typedef to make it take ssize_t as the type of the key.
	(mem_fn_context_rel::vtable_offset_in_bits_): Make this data
	member be of ssize_t type, not size_t.
	(mem_fn_context_rel::mem_fn_context_rel): Initialize the
	vtable_offset_in_bits_ data member to -1.
	* src/abg-ir.cc (member_function_has_vtable_offset): Define new
	function.
	(get_member_function_vtable_offset): Return a ssize_t, not a
	size_t.
	(set_member_function_vtable_offset): Take a ssize_t, not a size_t.
	* src/abg-dwarf-reader.cc (die_virtual_function_index): Take an
	int64_t& rather than a uint64_t&.
	(finish_member_function_reading): Don't set the vtable offset if
	it's -1.
	* src/abg-reader.cc (build_class_decl): Likewise.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2017-01-16 21:00:56 +01:00
..
abg-comp-filter.h Very light speed improvements 2016-11-29 17:08:19 +01:00
abg-comparison.h Bug 20887 - Show relative change of offsets 2016-12-02 21:29:28 +01:00
abg-config.h Add --version option to several libabigail tools 2015-11-16 12:54:10 +01:00
abg-corpus.h Update copyright year on a bunch of files 2017-01-05 12:51:49 +01:00
abg-diff-utils.h Constify some diff-utils functor operators 2015-09-21 10:46:06 +02:00
abg-dwarf-reader.h Support Linux Kernel binaries 2017-01-06 12:35:22 +01:00
abg-fwd.h Support virtual member functions with vtable offset not yet set 2017-01-16 21:00:56 +01:00
abg-hash.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-ini.h Support empty properties in INI files 2016-11-10 14:09:51 +01:00
abg-interned-str.h Cleanup namespace importing in abg-interned-str.h 2016-10-10 12:57:47 +02:00
abg-ir.h Support virtual member functions with vtable offset not yet set 2017-01-16 21:00:56 +01: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 Drop suppressed ABI artifacts from the IR 2016-09-21 18:35:08 +02:00
abg-sptr-utils.h Setup per-corpus type maps indexed by type names 2016-11-29 16:16:43 +01:00
abg-suppression.h Support Linux Kernel ABI whitelist files 2017-01-06 12:41:57 +01:00
abg-tools-utils.h Support Linux Kernel ABI whitelist files 2017-01-06 12:41:57 +01: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 Add --version option to several libabigail tools 2015-11-16 12:54:10 +01: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-workers.h Make API documentation of thread pools visible 2016-04-27 23:58:50 +02:00
abg-writer.h Update copyright years 2015-01-07 17:52:10 +01:00
Makefile.am Split suppression engine off of abg-comparison.{cc,h} 2016-05-08 12:29:57 +02:00