Commit Graph

7 Commits

Author SHA1 Message Date
Dodji Seketeli
73814ba4fa Misc Doxygen API doc fixes
* include/abg-comparison.h: Various doxygen api doc string fixes.
	* include/abg-diff-utils.h: Likewise.
	* include/abg-dwarf-reader.h: Likewise.
	* include/abg-ir.h: Likewise.
	* include/abg-reader.h: Likewise.
	* include/abg-writer.h: Likewise.
	* src/abg-comparison.cc: Likewise.
	* src/abg-corpus.cc: Likewise.
	* src/abg-dwarf-reader.cc: Likewise.
	* src/abg-ir.cc: Likewise.
	* src/abg-libxml-utils.cc: Likewise.
	* src/abg-reader.cc: Likewise.
	* src/abg-writer.cc: Likewise.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-01-17 15:44:25 +01:00
Dodji Seketeli
2c9fb3e70d Support new 'abi-corpus' native XML format (.abi)
* include/abg-reader.h (read_corpus_from_native_xml)
	(read_corpus_from_native_xml_file): Declare new entry points.
	* include/abg-writer.h (write_corpus_to_native_xml)
	(write_corpus_to_native_xml_file): Likewise.
	* src/abg-reader.cc (read_translation_unit_from_input): Renamed
	read_input into this.  Support new 'path' attribute for
	'abi-instr' XML element.
	(read_corpus_from_input): New static function.
	(read_translation_unit_from_file)
	(read_translation_unit_from_buffer)
	(read_translation_unit_from_istream): Update wrt read_input ->
	read_translation_unit_from_input.
	(read_corpus_from_native_xml, read_corpus_from_native_xml)
	(read_corpus_from_native_xml_file): Define new entry points.
	* src/abg-writer.cc (write_translation_unit): Write 'path'
	attribute into the 'abi-instr' xml element.
	(write_corpus_to_native_xml, write_corpus_to_native_xml_file):
	Define new entry points.
	* tools/abg-tools-utils.h (file_type::{FILE_TYPE_XML_CORPUS,
	FILE_TYPE_ZIP_CORPUS}): New enumerators.
	* tools/abg-tools-utils.cc (guess_file_type): Support detection of
	the new xml file format containing a document root 'abi-corpus'
	root element.
	* tools/bidiff.cc (main): Support diffing xml corpus-es and zip
	corpus-es.
	* tools/bidw.cc (main): Recognize elf files before reading them.
	* tools/bilint.cc (main): Support reading xml/zip corpus-es too.
	* tests/data/test-read-write/test[0-23].xml: Update 'path'
	attribute.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-01-07 14:12:26 +01:00
Dodji Seketeli
4ca76c4658 Misc style fixes
* include/abg-writer.h (write_translation_unit): Re-indent parms.
	* src/abg-writer.cc (write_translation_unit): Likewise.
	* test/test-read-write.cc (main): Fix white space.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-01-07 14:07:14 +01:00
Dodji Seketeli
6258b5f824 Prepare serialization API for multiple backends
* include/abg-reader.h: New file with abigail::xml_reader APIs.
	* include/abg-writer.h: New file with abigail::xml_writer APIs.
	* include/Makefile.am: Add the new files above to the source
	distribution.
	* src/abg-reader.cc: Update top-file comments.
	(namespace xml_reader): Rename namespace
	reader into this.
	(read_to_translation_unit, read_corpus_from_archive): New static
	functions.
	(read_translation_unit_from_file)
	(read_translation_unit_from_file, read_corpus_from_file): New
	entry points.
	(struct array_deleter): New functor.
	(translation_unit::read): Remove this.
	* src/abg-writer.cc: Update top file comments.
	(namespace xml_writer): Rename namespace
	writer into this.
	(struct archive_write_ctxt): New internal type.
	(create_archive_write_context, write_translation_unit_to_archive)
	(write_translation_unit, write_corpus_to_archive): New low level
	static functions overloads.
	(write_corpus_to_archive, write_translation_unit): Public higher
	level overloads.
	(translation_unit::write): Remove.
	(dump): Update for new xml_writer namespace.
	* include/abg-ir.h (translation_unit::{read, write}): Remove these
	serialization methods.
	* include/abg-corpus.h (corpus_sptr): New convenience typedef.
	(corpus::{read, write}): Remove these methods.
	* src/abg-corpus.cc (corpus::{read, write})
	(corpus::impl::{serialized_tus, archive}): Remove these members.
	(corpus::impl::{get_archive, close_archive, write_tu_to_archive,
	read_to_translation_unit}): Remove these methods.
	* tests/test-bidiff.cc (main): Update for usage of the new
	xml_reader API.
	* tests/test-read-write.cc (main): Likewise. Update for the usage
	of the new xml_writer API, too.
	* tests/test-walker.cc (main): Update for the usage of the new
	xml_reader API.
	* tests/test-write-read-archive.cc (main): Likewise.  And for the
	xml_writer API, too.
	* tools/biar.cc (add_tus_to_archive, extract_tus_from_archive): Likewise.
	* tools/bidiff.cc (main): Likewise, for xml_reader APIs.
	* tools/bilint.cc (main): Likewise, for xml_writer APIs, too.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2013-12-04 20:26:38 +01:00
Benjamin Kosnik
9c7f025ae9 Simplify interface for serializing/deserializing translation_units.
2013-08-06  Benjamin Kosnik  <bkoz@redhat.com>

	* include/abg-ir.h (translation_unit::read): New member function.
	(translation_unit::write): Same.
	* src/abg-reader.cc (translation_unit::read): Define.
	* src/abg-writer.cc (translation_unit::write): Define.

	* include/abg-reader.h: Remove.
	* include/abg-writer.h: Remove.
	* include/Makefile.am (headers): Same.
	* include/Makefile.in: Regenerate.
2013-08-14 15:07:18 +02:00
Benjamin Kosnik
e80ad1adee Forward decls for abg-ir.h, doxygen fixups, restyle.
* include/abg-irfwd.h: New file for forward declarations.
	* include/Makefile.am: Add new header.
	* include/Makefile.in: Regenerate.

	* include/*: Forward declare, doxygen fixups, restyle.
	* src/*: Same.

	* src/abg-corpus.cc: Empty, removed.

	* doc/api/libabigail.doxy: Tweak.
2013-08-14 15:07:18 +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