* 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>
* 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>
* 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>
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.