* abg-ir.h (string_to_elf_symbol_type, string_to_elf_symbol_binding):
Declare new entry points.
* src/abg-ir.cc (string_to_elf_symbol_type)
(string_to_elf_symbol_binding): Define new entry points.
* include/abg-libxml-utils.h (xml_char_sptr_to_string): Declare
new entry points.
* src/abg-libxml-utils.cc (xml_char_sptr_to_string): Define new
entry points.
* src/abg-reader.cc (read_elf_symbol_type)
(read_elf_symbol_binding, build_elf_symbol): Define new static
functions.
(build_function_decl, build_var_decl): Use the new
build_elf_symbol and set the symbol to the function. Flag the
function as having a public symbol in the symbol table if the
symbol is public.
* src/abg-writer.cc (write_elf_symbol_type)
(write_elf_symbol_binding, write_elf_symbol): Define new static
functions.
(write_var_decl, write_function_decl): Use the new
write_elf_symbol to serialize the symbol for the decl.
* tests/data/test-read-dwarf/test[01].abi: Adjust.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* include/abg-sptr-utils.h: New file.
* include/Makefile.am: Add abg-sptr-utils. to the build system.
* include/abg-libxml-utils.h (reader_sptr, xml_char_sptr): Remove
these typedefs as there are now in abg-sptr-utils.
(build_sptr): Likewise for this template and its specializations
declarations.
* src/abg-libxml-utils.cc (sptr_utils::build_sptr): Mode the
definition of the specializations for xmlTextReader and xmlChar
into the sptr_utils namespace.
* include/abg-corpus.h
(corpus::{get_regex_patterns_of_fns_to_suppress,
get_regex_patterns_of_vars_to_suppress,
get_regex_patterns_of_fns_to_keep,
get_regex_patterns_of_vars_to_keep}): Declare new member
functions.
* src/abg-comparison.cc (sptr_utils::regex_t_deleter): Define new
functor.
(build_sptr) Define new specialization for regex_t.
(struct array_deleter): Remove unused functor.
(corpus::priv::regex_patterns_{fns,vars}_to_{suppress,keep}): New data
members.
(symtab_build_visitor_type::regex_patterns_{fns,vars}_to_{suppress,keep}):
Likewise.
(symtab_build_visitor_type::r_{fns,vars}_{suppress,keep})):
Likewise.
(symtab_build_visitor_type::symtab_build_visitor_type): Update the
signature of this constructor to take regex patterns for functions
and variables to suppress and to keep. Also, initialize the data
members from these new parameters.
(symtab_build_visitor_type::regex_{fns,vars}_{suppress,keep}): New
member functions.
(symtab_build_visitor_type::{add_fn_to_wip_fns,
add_var_to_wip_vars}): Likewise.
(symtab_build_visitor_type::visit) Use either add_fn_to_wip_fns or
add_var_to_wip_vars depending on the overload of the visit()
member.
(corpus::priv::build_symbol_table): Update for the change of the
symtab_build_visitor_type constructor signature.
(corpus::get_regex_patterns_of_{fns,vars}_to_{suppress,keep}):
Define new member functions.
* tools/bidiff.cc (options::{drop,keep}_{fn,var}_regex_patterns}):
New data member.
(display_usage): Add help strings for --drop, --drop-fn,
--drop-var, --keep, --keep-fn, --keep-var
(parse_command_line): Parse the command lines above.
(set_corpus_keep_drop_regex_patterns): Define new static function.
(main): Use the new set_corpus_keep_drop_regex_patterns.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* include/abg-libxml-utils.h (new_reader_from_istream): Declare
new public entry point.
* src/abg-libxml-utils.cc (xml_istream_input_read)
(xml_istream_input_close): New static functions.
(new_reader_from_istream): Define new public input function.
* include/abg-reader.h (read_translation_unit_from_istream):
Declare new entry points.
* src/abg-reader.cc (read_translation_unit_from_istream): Define
new entry points.
* tools/bilint.cc (options::{read_from_stdin, noout}): New
members.
(display_usage): Document --stdin and --noout.
(parse_command_line): Adjust to consider that no option on the
command line means reading from stdin, just like --stdin. Support
the --noout option as well.
(main): Support Read the abi instr from stdin; in that case, what
was read is just serialized back to stdout, unless --noout was
supplied.
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>