Commit Graph

63 Commits

Author SHA1 Message Date
Dodji Seketeli
63c81f028d Do not install the generated documentation by default
* doc/manuals/Makefile.am: Do not install the generated
	documentation by default

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2015-01-14 18:46:06 +01:00
Dodji Seketeli
3ea7c4682e Make sure to install html docs & gziped info on make install
* doc/manuals/Makefile.am: Make sure Make sure to install html
	docs & gziped info on make install

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2015-01-14 14:36:20 +01:00
Dodji Seketeli
3d969dbe05 Small grammar fix in a manpage title
* doc/manuals/conf.py: Fix the grammar of the title of the abidiff
	man page.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2015-01-13 18:33:38 +01:00
Dodji Seketeli
5059907727 Generate texinfo documentation properly
There was a texinfo documentation that was being generated up to now,
but I haven't really looked at it.  Now that I have handled man pages
generation, I thought I'd give the texinfo generation a closer look
and ensure it's in a correct shape.  This patch cleans the generation
process up, changes the documentation markup so that it looks OK in
the generated texinfo file and handles the install of the generated
texinfo.

	* doc/manuals/Makefile.am: Generate texinfo doc, install it and
	uninstall it.
	* doc/manuals/libabigail-tools.rst: Do not use the :doc: syntax to
	refer to documents because it doesn't seem to work with sphinx
	right now.  Rather, use a table of content.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2015-01-13 18:33:23 +01:00
Dodji Seketeli
69c9f1fbcd Fix man pages installation
The man pages are created only if the user ran 'make man' in
doc/manuals.  So installing the man pages should be conditional on the
presence of the man pages.

	* doc/manuals/Makefile.am: Install the man pages only if they are
	generated.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2015-01-13 12:13:22 +01:00
Dodji Seketeli
b951add9f5 Do not forget to install the Manpages
* doc/manuals/Makefile.am: Add the man pages to the man7_MANS
	automake primary.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2015-01-13 11:29:11 +01:00
Dodji Seketeli
e7e2d24c5c Generate Manpages for abidiff, abidw, abilint
* doc/manuals/conf.py: Define man pages for abidiff, abidw,
	abilint and an introductory one for libabigail.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2015-01-13 10:34:57 +01:00
Sinny Kumari
20df3be7eb Include libabigail-website.doxy file in EXTRA_DIST
Without having doc/website/libabigail-website.doxy file
included in source distribution, make html-doc was giving error.

	* doc/Makefile.am: Include website/libabigail-website.doxy
	file in EXTRA_DIST

Signed-off-by: Sinny Kumari <skumari@redhat.com>
2015-01-06 15:40:18 +01:00
Dodji Seketeli
0e1d9f9892 Add a --dump-diff-tree to abidiff for debugging purposes
I have felt the need to emit a textual representation of the diff
nodes tree maintained by the comparison engine for changed functions
and variables.  This patch adds that functionality.

	* include/abg-comparison.h (enum visiting_kind): Add new
	DO_NOT_MARK_VISITED_NODES_AS_TRAVERSED enumerator.
	(diff_context::{default_output_stream, error_output_stream,
	dump_diff_tree}): Declare new accessors.
	(diff::end_traversing): Take a new boolean flag.
	(print_diff_tree): Add new overload for diff_sptr.
	* src/abg-comparison.cc
	(diff_context::priv::{default_output_stream_,
	error_output_stream_, dump_diff_tree_}): New data members.
	(priv::priv): Initialize them.
	(diff_context::{default_output_stream_, error_output_stream_,
	dump_diff_tree, dump_diff_tree}): Define new accessors.
	(diff::end_traversing): Take a new flag that control whether or
	not to mark the current diff node as having been traversed.
	(diff::traverse): Take in account the visiting kind carried by the
	visitor to determine if the visited node should be marked as being
	traversed.
	(corpus_diff::priv::maybe_dump_diff_tree): Define new member
	function.
	(corpus_diff::report): Call it.
	(diff_node_printer::visit): Pretty print the diff node just once.
	(print_diff_tree): Define a new overload for diff_sptr.
	* tools/abidiff.cc (options::dump_diff_tree): New data member.
	(options::options): Initialize it.
	(display_usage): Add a help string for the new --dump-diff-tree
	command line switch.
	(parse_command_line): Parse the new --dump-diff-tree command line
	switch.
	(set_diff_context_from_opts): Set the diff context according to
	the --dump-diff-tree presence.
	* doc/manuals/abidiff.rst: Add a bullet point for the new
	--dump-diff-tree command line switch.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-12-28 11:36:52 +01:00
Dodji Seketeli
5895bcf031 Fix typos in the abicompat manual
* doc/manuals/abicompat.rst: Fix typos.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-12-27 10:23:58 +01:00
Dodji Seketeli
f8213ce3d5 Fix a typo in the abidiff manual
* doc/manuals/abidiff.rst: Fix a typo.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-12-27 10:20:56 +01:00
Dodji Seketeli
2afa86fec1 Fix redundancy in abidiff manual
* doc/manuals/abidiff.rst: Remove the redundant bullet point about
	the --drop-fn command line switch.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-12-27 10:18:42 +01:00
Dodji Seketeli
9418ad46de Update doc string for new --no-redundant option of abidiff
* doc/manuals/abidiff.rst: Update the documentation string for the
	--no-redundant option of abidiff.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-12-26 19:03:16 +01:00
Dodji Seketeli
8e9dbc9cf1 Avoid showing ugly version info in the libabigail online manual
* doc/manuals/conf.py: Update copyright mention.  Do not show ugly
	version information.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-12-05 15:43:31 +01:00
Dodji Seketeli
ef7e71febf Initial implementation of the abicompat tool
Given an application A that links to a shared library L of version V
denoted L(V) and a subsequent version of that library denoted L(V+P),
the 'abicompat' tool tells the user if L(V+P) is still ABI compatible
with L(V+P).  And if it is not, abicompat gives a reports that shows
the differences between L(V) and L(V+P) that makes L(V+P)
ABI-incompatible with A.

The source code of this tool is in the tools/abicompat.cc source
file.  To support this new tool, this commit changes the comparison
engine to optionally avoid showing added symbols that were not
referenced by any debug info.  It changes the ABI corpus type to allow
the specification of a list of variables and functions symbols to keep
(and drop all other functions and variables which have other symbols
on the floor even before starting to compare the two libraries).

This is how the abicompat tool itself works.  It basically compares
L(V) and L(V+P) but it only looks at their exported functions and
variables which symbols are undefined in application A.  If the list
of exported and defined variables and functions of L(V) whose symbols
are undefined in A equals that of L(V+P) (including the sub-types of
these variables and functions) A is still compatible with L(V+P).
Otherwise, they might not be compatible depending on the kind of
differences that are found.

	* include/abg-comparison.h
	(diff_context::show_added_symbols_unreferenced_by_debug_info):
	Declare new accessors.
	(corpus_diff::{deleted_variables,
	deleted_unrefed_function_symbols,
	deleted_unrefed_variable_symbols,
	apply_filters_and_suppressions_before_reporting}): Declare new
	methods.
	(corpus_diff::diff_stats): Declare this new type.  Actually this
	was previously corpus_diff::priv::diff_stats, which was a hidden
	internal type..  We are moving it here, in the external API so
	that client code can have more information about changes
	statistics.  Change all the previously publicly accessible data
	members into accessor functions.
	* src/abg-comparison.cc (class corpus_diff::diff_stats::priv): New
	type.
	(diff_context::priv::show_added_syms_unreferenced_by_di_): New
	data member.
	(diff_context::priv::priv): Adjust.
	(diff_context::show_added_symbols_unreferenced_by_debug_info):
	Define this new method.
	(corpus_diff::priv::emit_diff_stats):  Do not show the diff stat
	if the only changes is added function or variables symbols and if
	we were instructed to not show added symbols.
	(corpus_diff::priv::{diff_stats_, filters_and_suppr_applied_}):
	New data members.
	(corpus_diff::priv::priv): Initialize the
	filters_and_suppr_applied_ data member.
	(corpus_diff::priv::diff_stats): Move this type to
	corpus_diff::diff_stats.
	(corpus_diff::priv::{apply_filters_and_compute_diff_stats,
	emit_diff_stats}): Adjust.
	(corpus_diff::apply_filters_and_suppressions_before_reporting):
	Define new member function.
	(corpus_diff::report): Use the new
	apply_filters_and_suppressions_before_reporting() function, rather
	than applying the filters and suppressions by ourselves.  Also
	adjust to the use the accessors of the new corpus_diff::diff_stats
	type.
	(corpus_diff::{deleted_variables,
	deleted_unrefed_function_symbols,
	deleted_unrefed_variable_symbols}): Define new accessors.
	(corpus_diff::diff_stats::{diff_stats, num_func_removed,
	num_func_added, num_func_changed, num_func_filtered_out,
	net_num_func_changed, num_vars_removed, num_vars_added,
	num_vars_changed, num_vars_filtered_out, net_num_vars_changed,
	num_func_sym_removed, num_func_syms_added, num_var_syms_removed,
	num_var_syms_added}): Define new member functions.
	* include/abg-corpus.h (corpus::{get_sym_ids_of_fns_to_keep,
	get_sym_ids_of_vars_to_keep}): Declare new methods.
	* src/abg-corpus.cc (corpus::priv::{sym_id_fns_to_keep,
	sym_id_vars_to_keep}): Added data members.
	(symtab_build_visitor_type::{unrefed_fun_symbols,
	unrefed_var_symbols, sym_id_fns_to_keep, sym_id_vars_to_keep}):
	Added new data members.
	(symtab_build_visitor_type::symtab_build_visitor_type): Take two
	additional parameters for the function and variable symbol ids to
	keep.
	(symtab_build_visitor_type::add_fn_to_wip_fns): Take the function
	symbols to keep in account when building the exported symbol
	table.
	(symtab_build_visitor_type::add_var_to_wip_vars): Likewise, take
	the variable symbols to keep in account when building the exported
	symbol table.
	(corpus::priv::build_public_decl_table): Adjust the initialization
	of the visitor that walks the ABI artifacts to build the exported
	symbol table to know take a list of function/variable symbols to
	keep.
	(corpus::priv::build_unreferenced_symbols_tables): Ensure that the
	public table of functions/variables is built before doing the work
	of this function.  Also, if a list of variable/function symbols to
	keep is given, drop all symbols that are not in that list on the
	floor.
	(corpus::{get_sym_ids_of_fns_to_keep,
	get_sym_ids_of_vars_to_keep}): Define new accessors.
	* tools/abicompat.cc: New abicompat tool.
	* doc/manuals/abicompat.rst: New documentation source for
	abicompat.
	* doc/manuals/libabigail-tools.rst: Add an entry for the abicompat
	doc.
	* tests/test-abicompat.cc: New test harness for the 'abicompat'
	tool.
	* tests/Makefile.am: Build the runtestabicompat test harness and
	add it to the list of tests harnesses that are run by make check.
	* tests/data/test-abicompat/libtest0-fn-changed-libapp-v0.so: New
	test input.
	* tests/data/test-abicompat/libtest0-fn-changed-libapp-v1.so: Likewise.
	* tests/data/test-abicompat/test0-fn-changed-app: Likewise.
	* tests/data/test-abicompat/test0-fn-changed-0.suppr: Likewise
	* tests/data/test-abicompat/test0-fn-changed-report-0.txt: Likewise.
	* tests/data/test-abicompat/test0-fn-changed-report-1.txt: Likewise.
	* tests/data/test-abicompat/test0-fn-changed-app.cc: Likewise.
	* tests/data/test-abicompat/test0-fn-changed-libapp.h: Likewise.
	* tests/data/test-abicompat/test0-fn-changed-libapp-v0.cc: Likewise.
	* tests/data/test-abicompat/test0-fn-changed-libapp-v1.cc: Likewise.
	* tests/data/test-abicompat/libtest1-fn-removed-v0.so: Likewise.
	* tests/data/test-abicompat/libtest1-fn-removed-v1.so: Likewise.
	* tests/data/test-abicompat/test1-fn-removed-app: Likewise.
	* tests/data/test-abicompat/test1-fn-removed-app.cc: Likewise.
	* tests/data/test-abicompat/test1-fn-removed-report-0.txt: Likewise.
	* tests/data/test-abicompat/test1-fn-removed-v0.cc: Likewise.
	* tests/data/test-abicompat/test1-fn-removed-v1.cc: Likewise.
	* tests/data/test-abicompat/libtest2-var-removed-v0.so: Likewise.
	* tests/data/test-abicompat/libtest2-var-removed-v1.so: Likewise.
	* tests/data/test-abicompat/test2-var-removed-app: Likewise.
	* tests/data/test-abicompat/test2-var-removed-app.cc: Likewise.
	* tests/data/test-abicompat/test2-var-removed-report-0.txt: Likewise.
	* tests/data/test-abicompat/test2-var-removed-v0.cc: Likewise.
	* tests/data/test-abicompat/test2-var-removed-v1.cc: Likewise.
	* tests/data/test-abicompat/libtest3-fn-removed-v0.so: Likewise.
	* tests/data/test-abicompat/libtest3-fn-removed-v1.so: Likewise.
	* tests/data/test-abicompat/test3-fn-removed-app: Likewise.
	* tests/data/test-abicompat/test3-fn-removed-app.cc: Likewise.
	* tests/data/test-abicompat/test3-fn-removed-report-0.txt: Likewise.
	* tests/data/test-abicompat/test3-fn-removed-v0.cc: Likewise.
	* tests/data/test-abicompat/test3-fn-removed-v1.cc: Likewise.
	* tests/data/test-abicompat/test3-fn-removed-version-script-0 Likewise.:
	* tests/data/test-abicompat/test3-fn-removed-version-script-1: Likewise.
	* tests/data/Makefile.am: Add the new test inputs above to the
	source distribution.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-12-05 15:43:31 +01:00
Dodji Seketeli
27e958dbba Fix manual documentation generation
The manual building was failing in make distcheck because it was being
built using the standard 'html' target.  That target needs the output
to not be rebuilt each time make install-html is called.  Which is not
easily possible for us.  So for now, the apidoc is being generated
using the html-doc target.  Also fix some other issues in the Makefile.

	* doc/manuals/Makefile.am: Trigger the manual generation from the
	html-doc target.  Add the source files to the distribution.  Fix
	the clean target.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-11-19 21:00:50 +01:00
Dodji Seketeli
42474ecf70 Fix apidoc building
The apidoc building was failing in make distcheck because it was being
built using the standard 'html' target.  That target needs the output
to not be rebuilt each time make install-html is called.  Which is not
easily possible for us.  So for now, the apidoc is being generated
using the html-doc target.

	* doc/Makefile.am: Trigger the building frm the html-doc target.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-11-19 21:00:16 +01:00
Dodji Seketeli
7e59bcc657 Use DESTDIR in doc/manuals/Makefile.am when creating the manuals
* doc/manuals/Makefile.am: Use the DESTDIR variable when
	addressing the destination directory of the created manuals.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-11-19 17:30:12 +01:00
Dodji Seketeli
bbcc2165d2 Fix a thinko in doc/Makefile.am
* apidoc-install-html-doxygen: Make sure that the directory
	$(DESTDIR)$(docdir) does not exist, before trying to create it.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-11-19 17:28:21 +01:00
Dodji Seketeli
1cdb8456c8 Add doc/api/libabigail.doxy to source distribution
Make distcheck revealed that the file doc/api/libabigail.doxy was
missing from the source distribution.  This patch adds it.

	* doc/Makefile.am: Add the file api/libabigail.doxy to source
	distribution.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-11-19 17:25:54 +01:00
Dodji Seketeli
52a33575b3 Make the install-html target of apidoc/manual be conditional
When running 'make distcheck', make install is automatically run,
which runs 'make install-html', especially in the apidoc and manual
sub-directories.  That triggers the building of the documentation,
using doxygen and python-sphinx even when these two packages are not
installed; in this case, install-html fails because doxygen or or the
python-sphinx binary is not found.  So this patch conditionnaly make the
install-html target run.  To run them, one must enable the building of
the apidoc or the manuals.  Note that just installing doxygen or
python-sphinx enables the building of the apidoc and the manuals.

	* configure.ac: add --enable-apidoc and --enable-manual.  Add the
	two ENABLE_APIDOC and ENABLE_MANUAL automake conditional
	variables.  Add the activation of the apidoc and manual into the
	final package configuration report.
	* doc/Makefile.am: Make the install-html, install-data-local and
	uninstall-local targets conditional on the ENABLE_APIDOC
	conditional variable.
	* doc/manuals/Makefile.am: Likewise, make the install-html,
	install-data-local and uninstall-data-local conditional on the
	ENABLE_MANUAL conditional variable.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-11-19 17:08:10 +01:00
Dodji Seketeli
03e57be0d1 make html now generates the apidoc, manual and web site
* doc/Makefile.am (html-local): Make the html file generation be
	triggered by the html-local target, not the html target.  The html
	target is a recursive target that calls the the html-local targets
	under each directory.
	(apidoc-html-doxygen): Rename the doc-html-doxygen target into
	(apidoc-install-html-doxygen): Rename doc-install-html-doxygen
	into this.  this.
	(DO_HTML, DO_INSTALL_HTML): Adjust.
	(install-data-local): New target.
	* doc/manuals/Makefile.am (install-html, install-data-local): New
	targets.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-11-18 23:54:16 +01:00
Dodji Seketeli
7fbe6a96ed Generate the manual html documentation in the proper build directory
* doc/manuals/Makefile.am: Renamed doc/manuals/Makefile into this.
	(BUILDDIR): Make this variable point to $(builddir)/_build as
	opposed to just _build previously.
	(SOURCEDIR): New variable that points to the source dir as known
	by the autotools magic.
	(ALLSPHINXOPTS): Make the source dir refer to the new
	$(SOURCEDIR), rather than just '.' as previously.
	* configure.ac (doc/manuals/Makefile): Generate this now.
	* doc/Makefile.am: Link the sub-directory doc/manuals.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-11-18 23:32:50 +01:00
Dodji Seketeli
3f9b3c0d8a Fix the reference to the IRC channel on the web page
* doc/website/mainpage.txt: The IRC server address is
	irc.oftc.net, not just oftc.net.
	* include/abg-fwd.h: Likewise.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-11-18 23:14:49 +01:00
Dodji Seketeli
69c95c6978 Remove mention of libzip from the web page
* doc/website/mainpage.txt: Remove mention of libzip from the list
	of dependencies.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-11-10 15:52:47 +01:00
Dodji Seketeli
c8c7bd14f4 Cleanup of the web page
* doc/website/libabigail-website.doxy: Remove the redundant
	information that was appearing on the web page.
	* doc/website/mainpage.txt: Clean-up the text of the web page, add
	information for the new IRC channel #libabigail on oftc.net,
	re-organize the content by putting sections where we had
	paragraphs.  Add a table of content.  Also add a web form to
	subscribe/unsubscribe to the mailing list.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-11-10 15:47:10 +01:00
Dodji Seketeli
4a0ba8556a Add usage examples to the abidiff manual
* doc/manuals/abidiff.rst: Add a usage example section along with
	some small and clean examples.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-11-03 15:35:17 +01:00
Dodji Seketeli
ab1fc12f5e Update the manual for variable suppression concepts
* doc/manuals/libabigail-concepts.rst: Add a section for variable
	suppression specification in the concepts part of the manual.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-11-01 13:04:15 +01:00
Dodji Seketeli
0c57d51750 Fix some restructured text doc glitches in the fn suppression manual
* doc/manuals/libabigail-concepts.rst: Fix quoting of the syntax
	of parameter specification string, for the function suppression
	concepts.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-11-01 13:02:54 +01:00
Dodji Seketeli
f78801b595 Update the suppr-doc.txt file for variable suppressions
* doc/suppr-doc.txt: Add the suppress_variable section example.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-11-01 12:21:59 +01:00
Dodji Seketeli
f80b261255 Fix regexp escaping section of manual
* doc/manuals/libabigail-concepts.rst: Re-indent and fix some
	typos in the regexp escaping section of the manual.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-11-01 12:15:14 +01:00
Dodji Seketeli
d7d7e94661 Doxygen shouldn't extract doc for static functions or private types
* doc/api/libabigail.doxy: Do not extract doc for static
	functions, local classes.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-11-01 12:10:14 +01:00
Dodji Seketeli
faeb15173a Fix a typo in the manual about function suppressions
* doc/manuals/libabigail-concepts.rst: Fix a typo.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-10-28 18:16:33 +01:00
Dodji Seketeli
23772b3f8d Initial support for function suppressions
* include/abg-comparison.h (enum visiting_kind): Change the
	meaning of this.  It was to determine if traversal was to be done
	in a pre or post manner.  But with the recent addition of
	diff_node_visitor::visit_{begin,end}() notifiers, the pre/post
	handling is taken care of in a different way.  So now the meaning
	of this enum is changed to handle whether diff node children
	should be visited or not.  So the enumerators are now
	DEFAULT_VISITING_KIND, and SKIP_CHILDREN_VISITING_KIND.  And it's
	a bit-field.
	(operator{&,~}): Declare more bit manipulation operators for the
	enum visiting_kind.
	(function_suppression_sptr, function_suppressions_type): New
	typedefs.
	(function_suppression, function_suppression::parameter_spec):
	Declare new types.
	(read_function_suppressions): Declare new function.
	(diff_node_visitor::diff_node_visitor): Adjust for the enum
	visiting_kind change.  Value-initialize the visiting_kind_ data
	member.
	* src/abg-comparison.cc (operator{&,~}): Define these operators
	for enum visiting_kind.
	(read_type_suppressions): Forward declare this static function.
	(read_function_suppression, read_parameter_spec_from_string):
	Define new static functions.
	(read_suppressions): Update to read function suppressions too,
	using the new read_function_suppression function above.
	(class function_suppression::parameter_spec::priv): Define new
	type.
	(function_suppression::parameter_spec::*): Define the member
	functions of the new function_suppression::parameter_spec type.
	(class function_suppression::priv): Define new type.
	(function_suppression::*): Define the member functions of the new
	function_suppression type.
	(diff::traverse): There is no more {PRE,POST}_VISITING_KIND
	enumerator.  So nuke the code that was dealing with it.
	(redundancy_marking_visitor::skip_children_nodes_): New data
	member flag.
	(redundancy_marking_visitor::visit_begin): If the current diff
	node is not be reported (is filtered out), do not bother visit its
	children nodes for the purpose of marking redundant nodes.  So use
	the new skip_children_nodes_ flag above to know we are in that case.
	(redundancy_marking_visitor::visit_end): Unset the new
	skip_children_nodes_ flag above when appropriate.
	* include/abg-fwd.h (is_function_decl): Declare new function.
	* include/abg-ir.h
	(function_type::get_parm_at_index_from_first_non_implicit_parm):
	Declare new member function.
	* src/abg-ir.cc (is_function_decl): Define new function.
	(function_type::get_parm_at_index_from_first_non_implicit_parm):
	Define new member function.
	* src/abg-comp-filter.cc (apply_filter): Adjust for the enum
	visiting_kind change.  No need to set it for filters anymore
	* doc/suppr-doc.txt: Update examples of function suppression.
	* doc/manuals/libabigail-concepts.rst: Update the manual for the
	function suppression addition.
	* tests/data/test-diff-suppr/libtest5-fn-suppr-v0.so: New test input.
	* tests/data/test-diff-suppr/libtest5-fn-suppr-v1.so: New test input.
	* tests/data/test-diff-suppr/libtest6-fn-suppr-v0.so: New test input.
	* tests/data/test-diff-suppr/libtest6-fn-suppr-v1.so: New test input.
	* tests/data/test-diff-suppr/test5-fn-suppr-0.suppr: New test input.
	* tests/data/test-diff-suppr/test5-fn-suppr-1.suppr: New test input.
	* tests/data/test-diff-suppr/test5-fn-suppr-2.suppr: New test input.
	* tests/data/test-diff-suppr/test5-fn-suppr-3.suppr: New test input.
	* tests/data/test-diff-suppr/test5-fn-suppr-4.suppr: New test input.
	* tests/data/test-diff-suppr/test5-fn-suppr-report-0.txt: New test input.
	* tests/data/test-diff-suppr/test5-fn-suppr-report-1.txt: New test input.
	* tests/data/test-diff-suppr/test5-fn-suppr-report-2.txt: New test input.
	* tests/data/test-diff-suppr/test5-fn-suppr-report-3.txt: New test input.
	* tests/data/test-diff-suppr/test5-fn-suppr-report-4.txt: New test input.
	* tests/data/test-diff-suppr/test5-fn-suppr-report-5.txt: New test input.
	* tests/data/test-diff-suppr/test5-fn-suppr-v0.cc: Source code for
	new test input.
	* tests/data/test-diff-suppr/test5-fn-suppr-v1.cc: Source code for
	new test input.
	* tests/data/test-diff-suppr/test6-fn-suppr-0.suppr: New test input.
	* tests/data/test-diff-suppr/test6-fn-suppr-1.suppr: New test input.
	* tests/data/test-diff-suppr/test6-fn-suppr-2.suppr: New test input.
	* tests/data/test-diff-suppr/test6-fn-suppr-3.suppr: New test input.
	* tests/data/test-diff-suppr/test6-fn-suppr-report-0.txt: New test input.
	* tests/data/test-diff-suppr/test6-fn-suppr-report-1.txt: New test input.
	* tests/data/test-diff-suppr/test6-fn-suppr-report-2.txt: New test input.
	* tests/data/test-diff-suppr/test6-fn-suppr-report-3.txt: New test input.
	* tests/data/test-diff-suppr/test6-fn-suppr-report-4.txt: New test input.
	* tests/data/test-diff-suppr/test6-fn-suppr-v0.cc: Source code for
	new test input.
	* tests/data/test-diff-suppr/test6-fn-suppr-v1.cc: Source code for
	new test input.
	* tests/data/test-diff-suppr/test6-fn-suppr-version-script: New
	test input.
	* tests/Makefile.am: Add the new files above to source
	the distribution.
	* tests/test-diff-suppr.cc (in_out_specs): Add the test inputs
	above to the list of tests to be run by this harness.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-10-28 17:36:32 +01:00
Dodji Seketeli
b1d6b00f4b Fix typo in suppression specification manual
* doc/manuals/libabigail-concepts.rst: Fix name -> name_regexp.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-10-27 21:13:35 +01:00
Dodji Seketeli
f44110b326 Support comparing symbols not referenced by debug info
* doc/manuals/abidiff.rst: Adjust intro to mention that w/o debug
	info, abidiff now works but just report about added/removed
	symbols.  Add documentation about the new
	--no-unreferenced-symbols option.
	* include/abg-comparison.h (string_elf_symbol_map): New typedef.
	(diff_context::show_symbols_unreferenced_by_debug_info): Declare
	new accessors.
	* src/abg-comparison.cc
	(diff_context::priv::show_syms_unreferenced_by_di_): New data
	member.
	(diff_context::priv::priv): Adjust.
	(diff_context::show_symbols_unreferenced_by_debug_info): Implement
	these accessors.
	(corpus_diff::priv::{unrefed_fn_syms_edit_script_,
	unrefed_var_syms_edit_script_, added_unrefed_fn_syms_,
	deleted_unrefed_fn_syms_, added_unrefed_var_syms_,
	deleted_unrefed_var_syms_}): New data members.
	(corpus_diff::priv::diff_stats::{num_func_syms_removed,
	num_func_syms_added, num_var_syms_removed, num_var_syms_added}):
	New data members.
	(corpus_diff::priv::diff_stats::diff_stats): Adjust.
	(corpus_diff::ensure_lookup_tables_populated): Populate lookup
	tables for added/removed symbols that are not referenced by any
	debug info.
	(corpus_diff::priv::apply_filters_and_compute_diff_stats): Compute
	stats for the added/removed symbols not referenced by any debug
	info.
	(corpus_diff::priv::emit_diff_stats): Emit stats about
	added/removed symbols that are not referenced by any debug info.
	(corpus_diff::length): Adjust to take in account added/removed
	symbols not referenced by any debug info.
	(show_linkage_name_and_aliases): New static function.
	(corpus_diff::report): When emitting a symbol name, emit its
	version too, and tell if it aliases other symbols.  Avoid emitted
	extra new lines.  Report added/removed symbols not referenced by
	any debug info.
	(compute_diff): In the overload for corpus_sptr, compute the diffs
	for symbols not referenced by debug info.
	* include/abg-corpus.h
	(corpus::get_unreferenced_{function,variable}_symbols): Declare
	new member functions.
	* src/abg-corpus.cc (corpus_priv::{unrefed_fun_symbols,
	unrefed_var_symbols}): New data members.
	(corpus_priv::build_unreferenced_symbols_tables): Define new
	member function.
	(struct comp_elf_symbols_functor): New functor.
	(corpus::is_empty): Adjust to take in account added/removed
	symbols not referenced by debug info.
	(corpus::{get_unreferenced_function_symbols,
	corpus::get_unreferenced_variable_symbols}): Define these
	accessors.
	* include/abg-dwarf-reader.h (enum status): Transform this into
	bitfields.  Add a STATUS_UNKNOWN value that has the value 0.
	(operator|(status, status), operator&(status, status))
	(operator|=(status&, status), operator&=(status, status)): New
	bit-wise operators to manipulate instances of the status bit-field.
	* src/abg-dwarf-reader.cc (get_version_for_symbol): Fix this to
	avoid returning garbage version sometimes.
	(read_debug_info_into_corpus): Fix this to return a non-null but
	empty corpus_sptr when there is no debug info available.
	(operator|(status, status), operator&(status, status))
	(operator|=(status&, status), operator&=(status, status)): Define
	these new bitwise operators to manipulate instances of the status
	bit-field.
	(read_corpus_from_elf): Now that the abigail::dwarf_reader::status
	is a bit-field, set it to reflect if debug info and/or symbol
	tables have been found.  Do not bail out if debug info hasn't been
	found.  Rather, keep going, and go look for symbols-only; this is
	a kind of operating in degraded mode.
	* include/abg-ir.h (elf_symbol::get_aliases_id_string): Add a flag
	that says if the current instance of elf_symbol should be included
	in the list of aliases or not.
	* src/abg-ir.cc (elf_symbol::get_aliases_id_string): Define it.
	* tests/data/test-diff-dwarf/test16-syms-only-v{0,1}.o: New test
	input.
	* tools/abidiff.cc
	(options::show_symbols_not_referenced_by_debug_info): New data
	member.
	(options:options): Adjust.
	(display_usage): Add an info string for the new
	--no-unreferenced-symbols command line option.
	(parse_command_line): Parse the new --no-unreferenced-symbols
	command line.
	(set_diff_context_from_opts): Set the diff_context according to
	the presence of --no-unreferenced-symbols.
	(main): Adjust for the fact that abigail::dwarf_reader::status is
	now a bit-field.
	* tools/abilint.cc (main): Adjust for the fact that
	abigail::dwarf_reader::status is now a bit-field..
	():
	* tests/data/test-diff-dwarf/test16-syms-only-report.txt: New test
	reference output.
	* tests/data/test-diff-dwarf/test16-syms-only-v{0,1}.cc: Source code
	for new test input.
	* tests/data/test-diff-dwarf/test17-non-refed-syms-v{0,1}.o: New
	test input.
	* tests/data/test-diff-dwarf/test17-non-refed-syms-v{0,1}.cc: New
	source code for test input.
	* tests/data/test-diff-dwarf/libtest18-alias-sym-v{0,1}.so: New
	test input.
	* tests/data/test-diff-dwarf/test18-alias-sym-report-0.txt:
	Reference output for new test input.
	* tests/data/test-diff-dwarf/test18-alias-sym-v{0,1}.cc: Source
	code for new test input.
	* tests/data/test-diff-dwarf/test18-alias-sym-version-script:
	Source code for new test input.
	* tests/Makefile.am: Add the new test materials to the source
	distribution.
	* tests/test-diff-dwarf.cc(in_out_specs): Add the new input tests
	above to the array of tests to run by this harness.
	(main): Emit empty reports for empty resulting diffs.
	* tests/data/test-diff-dwarf/test{0,8,9,12,14-inline-report,}-report.txt:
	Adjust.
	* tests/data/test-diff-filter/test{0,01,2,4,5,7,8,9,10,12,13,15-0,15-1}-report.txt:
	Likewise.
	* tests/data/test-diff-filter/test{19-enum,20-inline,}-report-0.txt:
	Likewise.
	* tests/data/test-diff-suppr/test0-type-suppr-report-{1,2}.txt:
	Likewise.
	* tests/data/test-diff-suppr/test{1,2}-typedef-suppr-report-1.txt:
	Likewise.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-10-22 23:04:40 +02:00
Dodji Seketeli
a8b00c0892 Update the manual for the suppression specification initial work
* doc/manuals/abidiff.rst: Add documentation for the new
	--suppressions command line switch.
	(--harmless, --harmful): Refer to the new "concepts" section
	below, where harmful/harmless concepts are now explained.
	(Notes): Move the content of the notes section where
	harmful/harmless concepts were explained, to the newly created
	'Concepts' section.
	* doc/manuals/index.rst: Limit the depth of the table of content
	to 2.  Add the new libabigail-concepts.rst stuff in here.  Adjust
	for the renaming of tools.rst to libabigail-tools.rst.
	* doc/manuals/libabigail-concepts.rst: New file.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-10-15 22:32:56 +02:00
Dodji Seketeli
ed12dd4b6a Replace is_typedef by type_kind property in type suppressions
* doc/suppr-doc.txt: Add type_kind property "documentation" in the
	type suppression.
	* include/abg-comparison.h (type_suppression::type_kind): New
	enum.
	(type_suppression::{get_consider_typedefness,
	set_consider_typedefness, get_is_typedef, set_is_typedef}):
	Remove.
	(type_suppression::{get_consider_type_kind,
	set_consider_type_kind, get_type_kind, set_type_kind}): Declare
	new methods.
	* Include/abg-fwd.h (is_type_decl): Declare new function.
	(is_enum): Declare new overload that takes a type_base_sptr.
	* src/abg-comparison.cc
	(type_suppression::priv::{consider_typedefness_, is_typedef_}):
	Remove these data members.
	(type_suppression::priv::{consider_type_kind_, type_kind_}): New
	data members.
	(type_suppression::priv::priv): Adjust.
	(type_suppression::{get_consider_typedefness,
	set_consider_typedefness, get_is_typedef, set_is_typedef}): Remove
	these member functions.
	(type_suppression::{get_consider_type_kind,
	set_consider_type_kind, get_type_kind, set_type_kind}): Define
	these new member functions.
	(type_suppression::suppresses_diff): Adjust to consider the kind
	of types more generally than just considering typedef-ness.
	(read_type_kind_string): New static function.
	(read_type_suppression): Use the above to parse the value of the
	new type_kind property.  Adjust the creation of the resulting
	type_suppression object.
	* src/abg-ir.cc (is_type_decl): Define new function.
	* tests/data/test-diff-suppr/test1-typedef-suppr-0.suppr: Adjust.
	* tests/data/test-diff-suppr/test1-typedef-suppr-1.suppr: Adjust.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-10-13 17:44:44 +02:00
Dodji Seketeli
4cca922ff5 Initial examples of suppression list specifications
* doc/suppr-doc.txt: New file.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-10-13 17:44:43 +02:00
Dodji Seketeli
56ee6cdcc5 Link manuals from the main web page
* doc/website/mainpage.txt: Add a link to the manuals.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-09-30 17:53:35 +02:00
Dodji Seketeli
2f296a7846 Initial documentation for libabigail
* doc/manuals/Makefile: New file, generated by sphinx-quickstart.
	* doc/manuals/abidiff.rst: New manual for abidiff.
	* doc/manuals/abidw.rst: New manual for abidw.
	* doc/manuals/abilint.rst: New manual for abilint.
	* doc/manuals/conf.py: New configuration file generated by sphinx-quickstart.
	* doc/manuals/index.rst: The root of the this documentation.
	* doc/manuals/libabigail-overview.rst: The overview of libabigail.
	* doc/manuals/tools.rst: The root of the tools manuals.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-09-26 17:06:12 +02:00
Jan Engelhardt
b24a8127cb Drop hardcoded substitutions
* doc/Makefile.am: Do not use @docdir@.  It's indeed replaced at
	configure time. But there is no need for this limitation with
	automake, as $(docdir) is available and replaceable anytime.
	* src/Makefile.am: Likewise for @DEPS_LIBS@ and @DEPS_CFLAGS@.

Signed-off-by: Jan Engelhardt <jengelh@inai.de>
2014-09-12 11:04:56 +02:00
Jonathan Wakely
22f6a640e7 Fix checkout & build instructions
* CONTRIBUTING: Fix Git repository url.
	* doc/website/mainpage.txt: Add elfutils into the dependencies
	list and fix the repository directory name.  Also use autoreconf
	-i.
	* include/abg-fwd.h: Fix Git repository URL.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-01-14 15:39:34 +01: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
a9a8834018 Tweak the apidoc mainpage
* include/abg-fwd.h<doxygen markup>: Fix link to the project web
	page and for git check-out.
2013-08-21 22:24:13 +02:00
Dodji Seketeli
2927145da4 Initial website generation-fu using Doxygen
* doc/website/mainpage.txt: New file representing the input for
	the website.
	* doc/website/libabigail-website.doxy: New file representing the
	doxygen configuration for the website generation.
	* doc/api/libabigail.doxy: Output doxygen generation warnings into
	a file.
	* doc/Makefile.am: Support generating the website from doxygen.
	Update the api generation relevant macros names for better
	consistency.  Make "make html" generate the website too.  Make
	"make clean" erase the website bits too.  Add a 'website'
	target to make the website.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2013-08-21 19:54:01 +02:00
Dodji Seketeli
b9ea069f1d Remove autotools-generated files
* Makefile.in: Remove this autotools-generated file.  I know that
	people in the GCC-realm like storing these autotools-generated
	files into the source control system, but I believe in this day
	and age, this is annoying (to say the least) for the project
	developers for no good reason.  Requiring (the ubiquitous)
	autoconf for building from source is no big deal today, and typing
	"autoreconf" is not hard to do, really.  And it saves the
	developers for having to update a bunch of boilerplate
	automatically generated files into the source control system; this
	is really unnecessary noise and it is a commonly accepted good
	practice to avoid doing it these days.  To help people who do not
	know how to handle this, there is a COMPILING file in the source
	tree that explains how to build the project from sources.
	* aclocal.m4: Likewise.
	* configure: Likewise.
	* include/Makefile.in: Likewise.
	* src/Makefile.in: Likewise.
	* doc/Makefile.in: Likewise.
	* tests/Makefile.in: Likewise.
2013-08-20 00:05:07 +02:00
Benjamin Kosnik
9258b41534 Template naming compression.
* include/abg-ir.h: Template naming compressions.
	(class_template_decl): To class_tdecl.
	(function_template_decl): To function_tdecl.
	(template_type_parameter): To type_tparameter.
	(template_non_type_parameter): To non_type_tparameter.
	(template_template_parameter): To template_tparameter.
	(tmpl_parm_type_composition): To type_composition.
	* include/abg-irfwd.h: Same.
	* src/abg-hash.cc: Same.
	* src/abg-ir.cc: Same.
	* src/abg-reader.cc: Same.
2013-08-14 15:07:19 +02:00
Benjamin Kosnik
9f7c830236 Slight change to doxy config.
* doc/api/libabigail.doxy: Turn off namespace scopes, on all the viz.
2013-08-14 15:07:19 +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