* include/abg-dwarf-reader.h (symbol_type, symbol_binding): New
enums.
(operator<<): Declare new overloads for the new enums above.
(lookup_symbol_from_elf, lookup_public_function_symbol_from_elf):
Declare new entry points.
* src/abg-dwarf-reader.cc (lookup_symbol_from_elf)
(lookup_public_function_symbol_from_elf)
(lookup_public_variable_symbol_from_elf): Define new static
functions.
(read_context::elf_{module_, handle}_): New data members.
(read_context::{elf_module, elf_handle}): New accessors.
(read_context::load_debug_info): Store the elf module into
read_context::_elf_module_. Adjust.
(read_context::{lookup_symbol_from_elf,
lookup_public_function_symbol_from_elf,
lookup_public_variable_symbol_from_elf}): New member functions.
(lookup_symbol_from_elf, lookup_public_function_symbol_from_elf)
(operator<<): Define public entry points.
* tools/bisym.cc: New tool to lookup a symbol in an elf file.
* tools/Makefile.am: Add the bisym.cc source file to the
distribution and arrange to compile it into a 'bisym' executable.
* tests/test-lookup-syms.cc: New test harness.
* tests/data/test-lookup-syms/test0-report.txt: New test input
for the harness above.
* tests/data/test-lookup-syms/test0.cc: Likewise.
* tests/data/test-lookup-syms/test0.o: Likewise
* tests/data/test-lookup-syms/test01-report.txt: Likewise.
* tests/data/test-lookup-syms/test02-report.txt: Likewise.
* tests/Makefile.am: Build the new runtestlookupsyms test and add
the new files to the distribution.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* 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>
* include/abg-comparison.h (class translation_unit_diff): New type.
(compute_diff): Make this take class_decl&, rather than
class_decl_sptr. Add new overloads for scope_decl& and
translation_unit&.
(report_changes): New overload for scope_diff& and
translation_unit&.
* src/abg-comparison.cc (struct class_decl_diff::priv): New type.
(class class_decl_diff): Add comments to methods.
(class translation_unit_diff): Implement methods.
(compute_diff, report_changes): Implement the new overloads.
(scope_diff::ensure_lookup_tables_populated): Fix a thinko here.
* src/abg-ir.cc (is_var_decl): Add new predicate.
* tools/abg-tools-utils.h (file_exists, is_regular_file)
(check_file): Declare new functions.
* tools/abg-tools-utils.cc (get_stat, file_exists, check_file)
(is_regular_file): Define new functions.
(is_dir): Use the new get_stat.
* tools/bidiff.cc: New file.
* tools/Makefile.am: Add tools/bidiff.cc to the build system; make it
produce the bidiff tool.
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>