libabigail
Public Member Functions | Public Attributes | List of all members
corpus_diff::priv Struct Reference

Public Member Functions

 priv ()
 Default constructor of corpus_diff::priv. More...
 
 priv (corpus_sptr first, corpus_sptr second, diff_context_sptr ctxt)
 Constructor of corpus_diff::priv. More...
 
bool added_function_is_suppressed (const function_decl *fn) const
 Test if the change reports for a give given added function has been deleted. More...
 
bool added_unreachable_type_is_suppressed (const type_base *t) const
 Test if an added type that is unreachable from public interface has been suppressed by a suppression specification. More...
 
bool added_unrefed_fn_sym_is_suppressed (const elf_symbol *) const
 Test if the change reports for a given added function symbol (that is not referenced by any debug info) has been suppressed. More...
 
bool added_unrefed_var_sym_is_suppressed (const elf_symbol *) const
 Test if the change reports for a given added variable symbol (that is not referenced by any debug info) has been suppressed. More...
 
bool added_variable_is_suppressed (const var_decl *var) const
 Test if the change reports for a given added variable have been suppressed. More...
 
void apply_filters_and_compute_diff_stats (corpus_diff::diff_stats &)
 Compute the diff stats. More...
 
void apply_supprs_to_added_removed_fns_vars_unreachable_types ()
 Apply suppression specifications for this corpus diff to the set of added/removed functions/variables, as well as to types not reachable from global functions/variables. More...
 
void categorize_redundant_changed_sub_nodes ()
 Walk the changed functions and variables diff nodes to categorize redundant nodes. More...
 
const string_diff_sptr_mapchanged_unreachable_types () const
 Get the map of diff nodes representing changed unreachable types. More...
 
const vector< diff_sptr > & changed_unreachable_types_sorted () const
 Get the sorted vector of diff nodes representing changed unreachable types. More...
 
void clear_lookup_tables ()
 Clear the lookup tables useful for reporting an enum_diff. More...
 
void clear_redundancy_categorization ()
 Walk the changed functions and variables diff nodes and clear the redundancy categorization they might carry. More...
 
void count_leaf_changes (size_t &num_changes, size_t &num_filtered)
 Count the number of leaf changes as well as the number of the changes that have been filtered out. More...
 
void count_leaf_type_changes (size_t &num_type_changes, size_t &num_type_changes_filtered)
 Count the number of leaf *type* changes as well as the number of the leaf type changes that have been filtered out. More...
 
void count_unreachable_types (size_t &num_added, size_t &num_removed, size_t &num_changed, size_t &num_filtered_added, size_t &num_filtered_removed, size_t &num_filtered_changed)
 Count the number of types not reachable from the interface (i.e, not reachable from global functions or variables). More...
 
bool deleted_function_is_suppressed (const function_decl *fn) const
 Test if the change reports for a given deleted function have been deleted. More...
 
bool deleted_unreachable_type_is_suppressed (const type_base *t) const
 Test if a deleted type that is unreachable from public interface has been suppressed by a suppression specification. More...
 
bool deleted_unrefed_fn_sym_is_suppressed (const elf_symbol *) const
 Test if the change reports for a given deleted function symbol (that is not referenced by any debug info) has been suppressed. More...
 
bool deleted_unrefed_var_sym_is_suppressed (const elf_symbol *) const
 Test if the change reports for a given deleted variable symbol (that is not referenced by any debug info) has been suppressed. More...
 
bool deleted_variable_is_suppressed (const var_decl *var) const
 Test if the change reports for a give given deleted variable has been deleted. More...
 
void emit_diff_stats (const diff_stats &stats, ostream &out, const string &indent)
 Emit the summary of the functions & variables that got removed/changed/added. More...
 
void ensure_lookup_tables_populated ()
 If the lookup tables are not yet built, walk the differences and fill the lookup tables. More...
 
diff_context_sptr get_context ()
 Getter of the context associated with this corpus. More...
 
bool lookup_tables_empty () const
 Tests if the lookup tables are empty. More...
 
void maybe_dump_diff_tree ()
 If the user asked to dump the diff tree node (for changed variables and functions) on the error output stream, then just do that. More...
 

Public Attributes

string_function_ptr_map added_fns_
 
string_type_base_sptr_map added_unreachable_types_
 
vector< type_base_sptr > added_unreachable_types_sorted_
 
string_elf_symbol_map added_unrefed_fn_syms_
 
string_elf_symbol_map added_unrefed_var_syms_
 
string_var_ptr_map added_vars_
 
bool architectures_equal_
 
function_decl_diff_sptrs_type changed_fns_
 
string_function_decl_diff_sptr_map changed_fns_map_
 
string_diff_sptr_map changed_unreachable_types_
 
vector< diff_sptrchanged_unreachable_types_sorted_
 
string_var_diff_sptr_map changed_vars_map_
 
vector< diff * > children_
 
diff_context_wptr ctxt_
 
string_function_ptr_map deleted_fns_
 
string_type_base_sptr_map deleted_unreachable_types_
 
vector< type_base_sptr > deleted_unreachable_types_sorted_
 
string_elf_symbol_map deleted_unrefed_fn_syms_
 
string_elf_symbol_map deleted_unrefed_var_syms_
 
string_var_ptr_map deleted_vars_
 
corpus_diff::diff_stats_sptr diff_stats_
 
bool finished_
 
corpus_sptr first_
 
edit_script fns_edit_script_
 
diff_maps leaf_diffs_
 
string pretty_representation_
 
corpus_sptr second_
 
bool sonames_equal_
 
var_diff_sptrs_type sorted_changed_vars_
 
string_function_ptr_map suppressed_added_fns_
 
string_type_base_sptr_map suppressed_added_unreachable_types_
 
string_elf_symbol_map suppressed_added_unrefed_fn_syms_
 
string_elf_symbol_map suppressed_added_unrefed_var_syms_
 
string_var_ptr_map suppressed_added_vars_
 
string_function_ptr_map suppressed_deleted_fns_
 
string_type_base_sptr_map suppressed_deleted_unreachable_types_
 
string_elf_symbol_map suppressed_deleted_unrefed_fn_syms_
 
string_elf_symbol_map suppressed_deleted_unrefed_var_syms_
 
string_var_ptr_map suppressed_deleted_vars_
 
edit_script unreachable_types_edit_script_
 
edit_script unrefed_fn_syms_edit_script_
 
edit_script unrefed_var_syms_edit_script_
 
edit_script vars_edit_script_
 

Detailed Description

Definition at line 1054 of file abg-comparison-priv.h.

Constructor & Destructor Documentation

◆ priv() [1/2]

priv ( )
inline

Default constructor of corpus_diff::priv.

Definition at line 1101 of file abg-comparison-priv.h.

◆ priv() [2/2]

priv ( corpus_sptr  first,
corpus_sptr  second,
diff_context_sptr  ctxt 
)
inline

Constructor of corpus_diff::priv.

Parameters
firstthe first corpus of this diff.
secondthe second corpus of this diff.
ctxtthe context of the diff.

Definition at line 1114 of file abg-comparison-priv.h.

Member Function Documentation

◆ added_function_is_suppressed()

bool added_function_is_suppressed ( const function_decl fn) const

Test if the change reports for a give given added function has been deleted.

Parameters
fnthe function to consider.
Returns
true iff the change reports for a give given added function has been deleted.

Definition at line 10342 of file abg-comparison.cc.

◆ added_unreachable_type_is_suppressed()

bool added_unreachable_type_is_suppressed ( const type_base t) const

Test if an added type that is unreachable from public interface has been suppressed by a suppression specification.

Parameters
tthe added unreachable type to be considered.
Returns
true iff t has been suppressed by a suppression specification.

Definition at line 10298 of file abg-comparison.cc.

◆ added_unrefed_fn_sym_is_suppressed()

bool added_unrefed_fn_sym_is_suppressed ( const elf_symbol s) const

Test if the change reports for a given added function symbol (that is not referenced by any debug info) has been suppressed.

Parameters
varthe function to consider.
Returns
true iff the change reports for a given added function symbol has been suppressed.

Definition at line 10418 of file abg-comparison.cc.

◆ added_unrefed_var_sym_is_suppressed()

bool added_unrefed_var_sym_is_suppressed ( const elf_symbol s) const

Test if the change reports for a given added variable symbol (that is not referenced by any debug info) has been suppressed.

Parameters
varthe variable to consider.
Returns
true iff the change reports for a given added variable symbol has been suppressed.

Definition at line 10456 of file abg-comparison.cc.

◆ added_variable_is_suppressed()

bool added_variable_is_suppressed ( const var_decl var) const

Test if the change reports for a given added variable have been suppressed.

Parameters
varthe variable to consider.
Returns
true iff the change reports for a given deleted variable has been deleted.

Definition at line 10380 of file abg-comparison.cc.

◆ apply_filters_and_compute_diff_stats()

void apply_filters_and_compute_diff_stats ( corpus_diff::diff_stats stat)

Compute the diff stats.

To know the number of functions that got filtered out, this function applies the categorizing filters to the diff sub-trees of each function changes diff, prior to calculating the stats.

Parameters
num_removedthe number of removed functions.
num_addedthe number of added functions.
num_changedthe number of changed functions.
num_filtered_outthe number of changed functions that are got filtered out from the report

Definition at line 10628 of file abg-comparison.cc.

◆ apply_supprs_to_added_removed_fns_vars_unreachable_types()

void apply_supprs_to_added_removed_fns_vars_unreachable_types ( )

Apply suppression specifications for this corpus diff to the set of added/removed functions/variables, as well as to types not reachable from global functions/variables.

Definition at line 10124 of file abg-comparison.cc.

◆ categorize_redundant_changed_sub_nodes()

void categorize_redundant_changed_sub_nodes ( )

Walk the changed functions and variables diff nodes to categorize redundant nodes.

Definition at line 11156 of file abg-comparison.cc.

◆ changed_unreachable_types()

const string_diff_sptr_map & changed_unreachable_types ( ) const

Get the map of diff nodes representing changed unreachable types.

Returns
the map of diff nodes representing changed unreachable types.

Definition at line 10590 of file abg-comparison.cc.

◆ changed_unreachable_types_sorted()

const vector< diff_sptr > & changed_unreachable_types_sorted ( ) const

Get the sorted vector of diff nodes representing changed unreachable types.

Upon the first invocation of this method, if the vector is empty, this function gets the diff nodes representing changed unreachable, sort them, and return the sorted vector.

Returns
the sorted vector of diff nodes representing changed unreachable types.

Definition at line 10603 of file abg-comparison.cc.

◆ clear_lookup_tables()

void clear_lookup_tables ( )

Clear the lookup tables useful for reporting an enum_diff.

Definition at line 9489 of file abg-comparison.cc.

◆ clear_redundancy_categorization()

void clear_redundancy_categorization ( )

Walk the changed functions and variables diff nodes and clear the redundancy categorization they might carry.

Definition at line 11193 of file abg-comparison.cc.

◆ count_leaf_changes()

void count_leaf_changes ( size_t &  num_changes,
size_t &  num_filtered 
)

Count the number of leaf changes as well as the number of the changes that have been filtered out.

Parameters
num_changesout parameter. This is set to the total number of leaf changes.
num_filteredout parameter. This is set to the number of leaf changes that have been filtered out.

Definition at line 10497 of file abg-comparison.cc.

◆ count_leaf_type_changes()

void count_leaf_type_changes ( size_t &  num_changes,
size_t &  num_filtered 
)

Count the number of leaf *type* changes as well as the number of the leaf type changes that have been filtered out.

Parameters
num_changesout parameter. This is set to the total number of leaf type changes.
num_filteredout parameter. This is set to the number of leaf type changes that have been filtered out.

Definition at line 10517 of file abg-comparison.cc.

◆ count_unreachable_types()

void count_unreachable_types ( size_t &  num_added,
size_t &  num_deleted,
size_t &  num_changed,
size_t &  num_filtered_added,
size_t &  num_filtered_deleted,
size_t &  num_filtered_changed 
)

Count the number of types not reachable from the interface (i.e, not reachable from global functions or variables).

Parameters
num_addedthis is set to the number of added types not reachable from the interface.
num_deletedthis is set to the number of deleted types not reachable from the interface.
num_changedthis is set to the number of changed types not reachable from the interface.
num_filtered_addedthis is set to the number of added types not reachable from the interface and that have been filtered out by suppression specifications.
num_filtered_deletedthis is set to the number of deleted types not reachable from the interface and that have been filtered out by suppression specifications.
num_filtered_changedthis is set to the number of changed types not reachable from the interface and that have been filtered out by suppression specifications.

Definition at line 10564 of file abg-comparison.cc.

◆ deleted_function_is_suppressed()

bool deleted_function_is_suppressed ( const function_decl fn) const

Test if the change reports for a given deleted function have been deleted.

Parameters
fnthe function to consider.
Returns
true iff the change reports for a give given deleted function have been deleted.

Definition at line 10279 of file abg-comparison.cc.

◆ deleted_unreachable_type_is_suppressed()

bool deleted_unreachable_type_is_suppressed ( const type_base t) const

Test if a deleted type that is unreachable from public interface has been suppressed by a suppression specification.

Parameters
tthe deleted unreachable type to be considered.
Returns
true iff t has been suppressed by a suppression specification.

Definition at line 10320 of file abg-comparison.cc.

◆ deleted_unrefed_fn_sym_is_suppressed()

bool deleted_unrefed_fn_sym_is_suppressed ( const elf_symbol s) const

Test if the change reports for a given deleted function symbol (that is not referenced by any debug info) has been suppressed.

Parameters
varthe function to consider.
Returns
true iff the change reports for a given deleted function symbol has been suppressed.

Definition at line 10399 of file abg-comparison.cc.

◆ deleted_unrefed_var_sym_is_suppressed()

bool deleted_unrefed_var_sym_is_suppressed ( const elf_symbol s) const

Test if the change reports for a given deleted variable symbol (that is not referenced by any debug info) has been suppressed.

Parameters
varthe variable to consider.
Returns
true iff the change reports for a given deleted variable symbol has been suppressed.

Definition at line 10437 of file abg-comparison.cc.

◆ deleted_variable_is_suppressed()

bool deleted_variable_is_suppressed ( const var_decl var) const

Test if the change reports for a give given deleted variable has been deleted.

Parameters
varthe variable to consider.
Returns
true iff the change reports for a give given deleted variable has been deleted.

Definition at line 10361 of file abg-comparison.cc.

◆ emit_diff_stats()

void emit_diff_stats ( const diff_stats s,
ostream &  out,
const string &  indent 
)

Emit the summary of the functions & variables that got removed/changed/added.

TODO: This should be handled by the reporters, just like what is done for reporter_base::diff_to_be_reported.

Parameters
outthe output stream to emit the stats to.
indentthe indentation string to use in the summary.

Report added/removed/changed functions.

Definition at line 10899 of file abg-comparison.cc.

◆ ensure_lookup_tables_populated()

void ensure_lookup_tables_populated ( )

If the lookup tables are not yet built, walk the differences and fill the lookup tables.

Definition at line 9502 of file abg-comparison.cc.

◆ get_context()

diff_context_sptr get_context ( )

Getter of the context associated with this corpus.

Returns
a smart pointer to the context associate with the corpus.

Definition at line 9470 of file abg-comparison.cc.

◆ lookup_tables_empty()

bool lookup_tables_empty ( ) const

Tests if the lookup tables are empty.

Returns
true if the lookup tables are empty, false otherwise.

Definition at line 9477 of file abg-comparison.cc.

◆ maybe_dump_diff_tree()

void maybe_dump_diff_tree ( )

If the user asked to dump the diff tree node (for changed variables and functions) on the error output stream, then just do that.

This function is used for debugging purposes.

Definition at line 11219 of file abg-comparison.cc.


The documentation for this struct was generated from the following files: