libabigail
Loading...
Searching...
No Matches
corpus_diff::priv Struct Reference

Public Member Functions

 priv ()
 Default constructor of corpus_diff::priv.
 
 priv (corpus_sptr first, corpus_sptr second, diff_context_sptr ctxt)
 Constructor of corpus_diff::priv.
 
bool added_function_is_suppressed (const function_decl *fn) const
 Test if the change reports for a give given added function has been deleted.
 
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.
 
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.
 
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.
 
bool added_variable_is_suppressed (const var_decl_sptr &var) const
 Test if the change reports for a given added variable have been suppressed.
 
void apply_filters_and_compute_diff_stats (corpus_diff::diff_stats &)
 Compute the diff stats.
 
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.
 
void categorize_redundant_changed_sub_nodes ()
 Walk the changed functions and variables diff nodes to categorize redundant nodes.
 
const string_diff_sptr_mapchanged_unreachable_types () const
 Get the map of diff nodes representing changed unreachable types.
 
const vector< diff_sptr > & changed_unreachable_types_sorted () const
 Get the sorted vector of diff nodes representing changed unreachable types.
 
void clear_lookup_tables ()
 Clear the lookup tables useful for reporting an enum_diff.
 
void clear_redundancy_categorization ()
 Walk the changed functions and variables diff nodes and clear the redundancy categorization they might carry.
 
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.
 
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.
 
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).
 
bool deleted_function_is_suppressed (const function_decl *fn) const
 Test if the change reports for a given deleted function have been deleted.
 
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.
 
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.
 
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.
 
bool deleted_variable_is_suppressed (const var_decl_sptr &var) const
 Test if the change reports for a give given deleted variable has been deleted.
 
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.
 
void ensure_lookup_tables_populated ()
 If the lookup tables are not yet built, walk the differences and fill the lookup tables.
 
diff_context_sptr get_context ()
 Getter of the context associated with this corpus.
 
bool lookup_tables_empty () const
 Tests if the lookup tables are empty.
 
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.
 

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_
 
function_decl_diff_sptrs_type incompatible_changed_fns_
 
var_diff_sptrs_type incompatible_changed_vars_
 
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 1065 of file abg-comparison-priv.h.

Constructor & Destructor Documentation

◆ priv() [1/2]

priv ( )
inline

Default constructor of corpus_diff::priv.

Definition at line 1114 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 1127 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 10684 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 10640 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 10760 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 10798 of file abg-comparison.cc.

◆ added_variable_is_suppressed()

bool added_variable_is_suppressed ( const var_decl_sptr & 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 10722 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 10970 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 10466 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 11566 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 10932 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 10945 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 9833 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 11603 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 10839 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 10859 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 10906 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 10621 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 10662 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 10741 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 10779 of file abg-comparison.cc.

◆ deleted_variable_is_suppressed()

bool deleted_variable_is_suppressed ( const var_decl_sptr & 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 10703 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 11309 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 9846 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 9814 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 9821 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 11629 of file abg-comparison.cc.

Member Data Documentation

◆ added_fns_

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

◆ added_unreachable_types_

string_type_base_sptr_map added_unreachable_types_

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

◆ added_unreachable_types_sorted_

vector<type_base_sptr> added_unreachable_types_sorted_

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

◆ added_unrefed_fn_syms_

string_elf_symbol_map added_unrefed_fn_syms_

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

◆ added_unrefed_var_syms_

string_elf_symbol_map added_unrefed_var_syms_

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

◆ added_vars_

string_var_ptr_map added_vars_

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

◆ architectures_equal_

bool architectures_equal_

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

◆ changed_fns_

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

◆ changed_fns_map_

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

◆ changed_unreachable_types_

string_diff_sptr_map changed_unreachable_types_

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

◆ changed_unreachable_types_sorted_

vector<diff_sptr> changed_unreachable_types_sorted_
mutable

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

◆ changed_vars_map_

string_var_diff_sptr_map changed_vars_map_

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

◆ children_

vector<diff*> children_

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

◆ ctxt_

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

◆ deleted_fns_

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

◆ deleted_unreachable_types_

string_type_base_sptr_map deleted_unreachable_types_

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

◆ deleted_unreachable_types_sorted_

vector<type_base_sptr> deleted_unreachable_types_sorted_

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

◆ deleted_unrefed_fn_syms_

string_elf_symbol_map deleted_unrefed_fn_syms_

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

◆ deleted_unrefed_var_syms_

string_elf_symbol_map deleted_unrefed_var_syms_

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

◆ deleted_vars_

string_var_ptr_map deleted_vars_

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

◆ diff_stats_

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

◆ finished_

bool finished_

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

◆ first_

corpus_sptr first_

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

◆ fns_edit_script_

edit_script fns_edit_script_

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

◆ incompatible_changed_fns_

function_decl_diff_sptrs_type incompatible_changed_fns_

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

◆ incompatible_changed_vars_

var_diff_sptrs_type incompatible_changed_vars_

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

◆ leaf_diffs_

diff_maps leaf_diffs_

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

◆ pretty_representation_

string pretty_representation_

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

◆ second_

corpus_sptr second_

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

◆ sonames_equal_

bool sonames_equal_

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

◆ sorted_changed_vars_

var_diff_sptrs_type sorted_changed_vars_

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

◆ suppressed_added_fns_

string_function_ptr_map suppressed_added_fns_

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

◆ suppressed_added_unreachable_types_

string_type_base_sptr_map suppressed_added_unreachable_types_

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

◆ suppressed_added_unrefed_fn_syms_

string_elf_symbol_map suppressed_added_unrefed_fn_syms_

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

◆ suppressed_added_unrefed_var_syms_

string_elf_symbol_map suppressed_added_unrefed_var_syms_

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

◆ suppressed_added_vars_

string_var_ptr_map suppressed_added_vars_

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

◆ suppressed_deleted_fns_

string_function_ptr_map suppressed_deleted_fns_

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

◆ suppressed_deleted_unreachable_types_

string_type_base_sptr_map suppressed_deleted_unreachable_types_

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

◆ suppressed_deleted_unrefed_fn_syms_

string_elf_symbol_map suppressed_deleted_unrefed_fn_syms_

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

◆ suppressed_deleted_unrefed_var_syms_

string_elf_symbol_map suppressed_deleted_unrefed_var_syms_

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

◆ suppressed_deleted_vars_

string_var_ptr_map suppressed_deleted_vars_

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

◆ unreachable_types_edit_script_

edit_script unreachable_types_edit_script_

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

◆ unrefed_fn_syms_edit_script_

edit_script unrefed_fn_syms_edit_script_

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

◆ unrefed_var_syms_edit_script_

edit_script unrefed_var_syms_edit_script_

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

◆ vars_edit_script_

edit_script vars_edit_script_

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


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