libabigail/include
Dodji Seketeli 5df40e91ce Remove the last direct fiddling with ELF from abipkgdiff.cc
Directly using elfutils from abipkgdiff.cc feels like a taping into
the wrong abstraction layer from this level.  So this patch moves the
determination of the type of elf file into abg-dwarf-reader.cc and
uses it from there.  The patch also simplifies the instantiation of
types elf_file and package, from abipkgdiff.cc.

	* abg-dwarf-reader.h (enum elf_type): Move this declaration here
	from abipkgdiff.cc to here.
	(get_type_of_elf_file): Declare this new function.
	(get_soname_from_elf): Change this to take a path to the elf file
	rather than a Elf* handler.  So now to use this, the user doesn't
	have to get her hand dirty with elfutils.
	* src/abg-dwarf-reader.cc (get_soname_from_elf): Change this to
	take a path to the elf file rather than a Elf* handler.
	(elf_file_type): Move this static function here, from
	abipkgdiff.cc.
	(get_type_of_elf_file): New function.  This has been factorized
	out of create_maps_of_package_content() in abipkgdiff.cc.
	* tools/abipkgdiff.cc (class elf_file): Changed struct elf_file
	into this.  Make the default constructor private.
	(elf_file::elf_file): Change the constructor to just take the path
	to the elf_file.  The base name, soname and elf file type are now
	computed from the path file, in the constructor.  This makes
	instantiation much much easier from the point of view of the user
	of the type.
	(struct abi_diff): Renamed struct abi_changes into this.
	(abi_diff::has_changes): Define new member function.
	(abi_diffs): Remove this global variable.
	(package::package): Remove the elf file type from the set of
	parameters of this constructor.  Rather, compute that elf file
	type from the path to the elf file, in the constructor.  Again,
	this eases the use of the type.
	(elf_file_type): Remove this from here, as it got moved to
	abg-dwarf-reader.cc.
	(compare): In the elf_file overload, return true if the comparison
	yields ABI changes.
	(create_maps_of_package_content): Do not fiddle with elfutils
	stuff here.  Rather, just instantiate elf_file and the analyzing
	of the file magically happens.
	(compare): Make the package overload take an abi_diff as output
	parameter, rather than populating a global variable in return.
	(compare): Add an other overload for package that doesn't take the
	abi_diff as output parameter and write it in terms of the previous
	one.
	(main): Adjust as the instantiation of package is now simpler.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2015-07-17 10:09:57 +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 Factorize incompatible and subtype changes detection 2015-07-09 11:10:24 +02:00
abg-config.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-corpus.h Build the set of exported decls directly during DWARF loading 2015-02-24 13:15:10 +01:00
abg-diff-utils.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-dwarf-reader.h Remove the last direct fiddling with ELF from abipkgdiff.cc 2015-07-17 10:09:57 +02:00
abg-fwd.h Better detection of parameter sub-type changes 2015-05-06 10:20:15 +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 Handle the life time of the map of canonical types 2015-07-09 11:12:40 +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 Guess RPM file type 2015-07-17 10:07:37 +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