]> sourceware.org Git - libabigail.git/commit
Add a --dump-diff-tree to abidiff for debugging purposes
authorDodji Seketeli <dodji@redhat.com>
Sat, 27 Dec 2014 11:42:34 +0000 (12:42 +0100)
committerDodji Seketeli <dodji@redhat.com>
Sun, 28 Dec 2014 10:36:52 +0000 (11:36 +0100)
commit0e1d9f9892156bd9ef3dcc9152af377bf5a8729c
tree2dcccdb5739b4cc99bbebb58bb840f67b754da29
parent5895bcf031a2aad36cd7b9661ac3dfe264de9f29
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>
doc/manuals/abidiff.rst
include/abg-comparison.h
src/abg-comparison.cc
tools/abidiff.cc
This page took 0.031666 seconds and 5 git commands to generate.