Commit Graph

16 Commits

Author SHA1 Message Date
Dodji Seketeli
bd1af4cd52 Initial support of reading an ABI Corpus from DWARF
* configure.ac: Check the presence of libdw.so and
	elfutils/libdwfl.h headers from elfutils and define the necessary
	linking flags.
	* include/abg-dwarf-reader.h: New header file
	* include/Makefile.am: Add the new header file to the source
	distribution.
	* src/abg-dwarf-reader.cc:: New file.
	* src/Makefile.am: Add the new file to the source distribution.
	* include/abg-fwd.h (dump): Add declarations for several overloads
	to allow dumping to a given output stream.
	* include/abg-ir.h (class translation_unit): Use a pimpl idiom for
	this now.
	(translation_unit::canonicalize_type): Declare new method.
	* src/abg-ir.cc (struct translation_unit::priv): New private type
	for the pimpl idiom for translation_unit.
	(translation_unit::{translation_unit, get_global_scope, get_path,
	set_path, get_loc_mgr}): Adjust for pimpl idiom.
	(translation_unit::canonicalize_type): Define this new method and
	one overload.
	* src/abg-writer.cc (dump): Define several overloads to dump IR
	nodes to given output streams.
	* tools/bidw.cc: New file for the new bidw tool.
	* tools/Makefile.am: Define rules to build the new bidw tools.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2013-12-07 08:07:54 +01:00
Dodji Seketeli
0d738e2b95 Initial version of an archive manipulation program: biar
* tests/test-utils.h (is_dir, ensure_dir_path_created)
	(ensure_parent_dir_created): Move these directories manipulation
	utilities from here to ...
	* tools/abg-tools-utils.h (is_dir, ensure_dir_path_created)
	(ensure_parent_dir_created): ... here in this new file.
	(dir_name, base_name): Declare these new functions.
	* tests/test-utils.cc (is_dir, ensure_dir_path_created)
	(ensure_parent_dir_created): Likewise, move these to ...
	* tools/abg-tools-utils.cc (is_dir, ensure_dir_path_created)
	(ensure_parent_dir_created): ... here in this new file.
	(dir_name, base_name): Define these.
	* tools/Makefile.am: New file.  Create a new libtoolsutils.la
	static library with stuff from tools/abg-tools-utils.cc in it.
	Also create a new 'biar' program with the stuff from the new
	tools/biar.cc in it.
	* tools/biar.cc: New file.  Contains the code for the new "biar"
	archive manipulation command line utility.
	* tests/test-read-write.cc (main): Adjust for the change about
	ensure_parent_dir_created above.
	* tests/test-write-read-archive.cc (main): Likewise.
	* Makefile.am (SUBDIRS): Add the new tools/ sub-directory to the
	build system.
	* configure.ac (AC_CONFIG_FILES): Generate tools/Makefile.
	* tests/Makefile.am: Make libtestutils.la link with the new
	libtoolsutils.la.  Make sure to express the dependencies between
	libtestutils.la and the binaries that depend on it.  Otherwise
	parallel builds can go awry.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2013-08-29 17:08:47 +02:00
Dodji Seketeli
c57e950ec7 Initial writing/reading of an ABI corpus to an archive
* configure.ac: Support detection of libzip dependency. Define
        new DEPS_CFLAGS and DEPS_LIBS variables for use in
        Makefile.am to refer to the dependency headers and
        libraries.
	* doc/website/mainpage.txt: Update this to talk about the new
	libzip dependency.
	* include/Makefile.am: Add abg-libzip-utils.h to the build system.
	* include/abg-corpus.h (corps): Hide abigail::corpus's private behind a
	pimpl idiom.
	(corpus::{drop_translation_units, get_file_path, set_file_path,
	write, read}): New methods.
	* include/abg-libxml-utils.h (new_reader_from_buffer): Declare new
	function.
	* include/abg-libzip-utils.h: New file.
	* src/Makefile.am: Add abg-corpus.cc and abg-libzip-utils.cc to
	the build system.  Refer to the library and headers dependencies
	via the new DEPS_LIBS and DEPS_CFLAGS variables.
	* src/abg-corpus.cc: New file.
	* src/abg-ir.cc (translation::set_path): New method.
	* src/abg-libxml-utils.cc (new_reader_from_buffer): Define new
	function.
	* src/abg-libzip-utils.cc: New file.
	* src/abg-reader.cc (translation_unit::read): New overload.
	* src/abg-writer.cc: Inject the names from the std namespace into
	the abigail namespace, rather than into abigail::writer.
	(abigail::translation_unit::write): New overload.  This can now
	use ofstream and the other stuff from std that are injected in the
	abigail:: namespace.
	* tests/Makefile.am: Add tests/test-write-read-archive.cc to the
	build system; use that to build runtestwritereadarchive.  Also add
	the input test data from
	tests/data/test-write-read-archive/test[0-4].xml.
	* /tests/data/test-write-read-archive/test[0-4].xml: New test
	input data files.
	* tests/test-write-read-archive.cc: New test for this archive
	write/read support.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2013-08-27 16:20:41 +02:00
Dodji Seketeli
fb481b3693 Add abg-version.h.in to the source distribution & cleanup
* include/Makefile.am:  Add abg-version.h.in to the source
	distribution.
	* configure.ac: Generate abg-version.h in using the existing
	AC_CONFIG_FILES macro call.
2013-08-22 17:07:07 +02:00
Dodji Seketeli
849b598cf5 Support pkgconfig through a new libabigail.pc file
* libabigail.pc.in: New pkgconfig file.
	* configure.ac: Define the LIBXML2_VERSION variable that is used
	in the libabigail.pc.in file.  Generate the libabigail.pc file
	from its libabigail.pc.in template.
	* Makefile.am: Add libabigail.pc.in to the source distribution.
	Install the generated libabigail.pc to the right destination.
2013-08-22 17:06:56 +02:00
Benjamin Kosnik
d23c4e9b96 Collapse subdir of include to include.
* include/libabigail/abg-*.h: Move to...
	* include/abg-*.h
	* include/libabigail: Remove.

	* configure.ac: Adjust include location from libabigail/include to
	include.
	* Makefile.in: Same.
	* aclocal.m4: Same.
	* configure: Same.
	* doc/Makefile.in: Same.
	* include/Makefile.am: Same.
	* src/Makefile.am: Same.
	* src/Makefile.in: Same.
	* tests/Makefile.am: Same.
	* tests/Makefile.in: Same.
2013-08-14 15:07:18 +02:00
Dodji Seketeli
f9d66af03c Put headers in include/libabigail
* include/libabigail: New directory.
	* include/Makefile.am:  New file.
	* include/libabigail/Makefile.am: New file.
	* src/abg-*.h: Move these in include/libabigail/*.h
	* src/Makefile.am: Set -I option to look for headers in include/libabigail
	* doc/api/libabigail.doxy: Look for headers in include/libabigail
	* tests/Makefile.am: Set -I option to look for headers in include/libabigail
	* abigail.m4: Set includedir to $prefix/include/libabigail for
	library used as a dep, or to srcdir/libabigail/include/libabigail
	in GCC source tree.
	* configure.ac: Add Makefile.am in include and include/libabigail
	* abigail.m4: Look for headers in include/libabigail when the
	libabigail is in in the source tree and in $incdir/libabigail when
	it is installed as a dependency.
2013-07-23 23:13:56 +02:00
Benjamin Kosnik
6fb9db6505 Fixup abg-version.h merge duplicate.
2013-05-21  Benjamin Kosnik  <bkoz@redhat.com>

	* configure.ac: Remove src/abg-version.h merge duplicate.
2013-07-23 23:13:54 +02:00
Benjamin Kosnik
73dec4acda Generate abg-version.h at configure time.
2013-05-20  Benjamin Kosnik  <bkoz@redhat.com>

	* configure.ac: Add src/abg-version.h to AC_CONFIG_FILES.
	* src/Makefile.am: Remove abg-version.h generation rules.
	* src/abg-version.h.in: New.
2013-07-23 23:13:54 +02:00
Benjamin Kosnik
cdf03dd644 Generate abg-version at configure time in builddir
* configure.ac: Add src/abg-version.h to AC_CONFIG_FILES.
	* src/Makefile.am: Remote ad-hoc generation of abg-version.h from
	here.
	* src/abg-version.h.in: New file.
	* configure: Re-generate.
	* src/Makefile.in: Likewise.
2013-07-23 23:13:52 +02:00
Dodji Seketeli
e4fefbdbe4 Allow autoconf-based clients to detect the library
* configure.ac: Define the components of the version number as
	autoconf variables.  Set the version number to 0.1.0
	* abigail.m4: New file
	* Makefile.am: Add abigail.m4 to the build system.  Install it in
	  $(datadir)/aclocal.
	* src/Makefile.am: Generate and add abg-version.h from the version
	number autoconf variable defined in configure.ac.  Re-generate
	abg-version.h each time configure.ac changes.
	* src/abg-config.h (abigail_get_library_version): Declare ...
	* src/abg-config.cc (abigail_get_library_version): ... and define
	this wirth C linkage.  This is useful for autoconf tests to test
	for the presence of the library.
	* configure: Re-generate.
	* Makefile.in: Likewise.
	* src/Makefile.in: Likewise.
	* tests/Makefile.in: Likewise.
2013-07-23 23:13:51 +02:00
Benjamin Kosnik
43a83cf453 Add doc dir. Add Doxgen api generation rules.
2013-04-02  Benjamin Kosnik  <bkoz@redhat.com>

	* doc: Add.
	* doc/Makefile.am (html, install-html): Add.
	* doc/Makefile.in: Add.
	* doc/api/libabigail.doxy: Add doxygen config.
	* src/abg-*: Add @file markup.
2013-04-03 15:21:33 +02:00
Benjamin Kosnik
342b932d54 Various autotool adjustments
* configure: Add.
	* configure.ac (AM_INIT_AUTOMAKE): Use gcc versions.
        (PKG_CHECK_MODULES): Re-use libjava/classpath solution, naming.
	* m4/pkg.m4: Add, take from classpath.
	* src/Makefile.am: Adjust names.
2013-03-27 21:01:54 +01:00
Dodji Seketeli
fc27d10cee Debugged type-decl de-serialization
* src/abg-ir.cc (namespace_decl::~namespace_decl): Add this
	missing virtual constructor definition.
	* src/abg-reader.cc (read_context::{get_cur_decl,pop_decl}):
	Return a null pointer when the decls stack is empty.
	(update_read_context): Don't try to de-reference a NULL cur_decl.
	(read_input): Don't try to poke at file validity here.  What was I
	thinking.  Really test for advance_cursor to return 1, expressing
	success.
	* src/abg-reader.h (read_file):  Fix style.
	* Makefile.am: Add tests sub-directory.
	* configure.ac: Build with debugging-friendly options if the
	ABIGAIL_DEBUG env variable is set.  Generate tests/Makefile.
	* tests/Makefile.am: New file.
	* tests/test-read-write.cc: Likewise.
	* tests/test-utils.{h,cc}: Likewise.
	* tests/data/test-read-write/input0.xml: Likewise.
2013-03-21 23:57:22 +01:00
Dodji Seketeli
8e225db39a Parse type-decl and namespace-decl elements
* configure.ac: Add libxml2 dependencies.
	* src/abg-corpus.{h,cc}: New files.
	* src/abg-hash.{h,cc}: Likewise.
	* src/abg-libxml-utils.{h,cc}: Likewise.
	* src/abg-reader.{h,cc}: Likewise.
	* src/abg-serialize.{h,cc}: Likewise.
	* src/abg-writer.h: Likewise.
	* src/Makefile.am: Build the new files above.
	* src/abg-ir.h (class location): Add public accessors for the value, and
	a truth operator.  Make the methods be inline.
	(class decl_base): Renamed decl into this.  Renamed what_decl_kind
	into what_kind. Renamed get_context into get_scope.  Add virtual
	destructor, accessors for location and name.
	(class {scope_decl, type_base, type_decl} ): Add virtual dtor.
	Re-style.
	(struct {decl_base_hash, type_decl_hash}): New hashing functors.
	(class {scope_type_decl, namespace_decl}): Add virtual dtor.
	* src/abg-ir.cc (location::*): Remove location definitions.  There
	are now inline in the header.
	(class decl_base): Renamed decl into this.  Remove most of the
	definitions from here as their are now inline in the header.
	(scope_decl::~scope_decl, type_base::~type_base)
	(type_decl::~type_decl, scope_type_decl::~scope_type_decl): New
	definitions.
2013-03-08 14:31:37 +01:00
Dodji Seketeli
d7d371a742 Initial import Abigail
This is the initial Import of the

    ABI Generic Analysis and Instrumentation Library
2013-02-28 11:42:57 +01:00