libabigail
|
This is the abstraction of a set of translation units (themselves seen as bundles of unitary abi artefacts like types and decls) bundled together as a corpus. A corpus is thus the Application binary interface of a program, a library or just a set of modules put together. More...
#include <abg-corpus.h>
Classes | |
class | exported_decls_builder |
Abstracts the building of the set of exported variables and functions. More... | |
struct | priv |
The private data of the corpus type. More... | |
Public Types | |
typedef shared_ptr< exported_decls_builder > | exported_decls_builder_sptr |
Convenience typedef for shared_ptr<exported_decls_builder>. More... | |
typedef vector< const function_decl * > | functions |
Convenience typedef for std::vector<abigail::ir::function_decl*> More... | |
enum | origin { ARTIFICIAL_ORIGIN , NATIVE_XML_ORIGIN , ELF_ORIGIN , DWARF_ORIGIN , CTF_ORIGIN , BTF_ORIGIN , LINUX_KERNEL_BINARY_ORIGIN } |
This abstracts where the corpus comes from. That is, either it has been read from the native xml format, from DWARF or built artificially using the library's API. More... | |
typedef vector< string > | strings_type |
A convenience typedef for std::vector<string>. More... | |
typedef vector< const var_decl * > | variables |
Convenience typedef for std::vector<abigail::ir::var_decl*> More... | |
Public Member Functions | |
corpus (const ir::environment &, const string &path="") | |
Constructor of the corpus type. More... | |
void | add (const translation_unit_sptr &) |
Add a translation unit to the current ABI Corpus. More... | |
bool | do_log () const |
Test if logging was requested. More... | |
void | do_log (bool) |
Request logging, or not. More... | |
void | drop_translation_units () |
Erase the translation units contained in this in-memory object. More... | |
const translation_unit_sptr | find_translation_unit (const string &path) const |
Find the translation unit that has a given path. More... | |
const string & | get_architecture_name () const |
Getter for the architecture name of the corpus. More... | |
const environment & | get_environment () const |
Getter of the enviroment of the corpus. More... | |
exported_decls_builder_sptr | get_exported_decls_builder () const |
Getter for the object that is responsible for determining what decls ought to be in the set of exported decls. More... | |
string & | get_format_major_version_number () const |
Getter of the major version number of the abixml serialization format. More... | |
string & | get_format_minor_version_number () const |
Getter of the minor version number of the abixml serialization format. More... | |
virtual const string_elf_symbols_map_type & | get_fun_symbol_map () const |
Getter for the function symbols map. More... | |
virtual const functions & | get_functions () const |
Return the functions public decl table of the current corpus. More... | |
corpus_group * | get_group () |
Getter of the group this corpus belongs to. More... | |
const corpus_group * | get_group () const |
Getter of the group this corpus is a member of. More... | |
const vector< string > & | get_needed () const |
Getter of the needed property of the corpus. More... | |
origin | get_origin () const |
Getter for the origin of the corpus. More... | |
string & | get_path () const |
Get the file path associated to the corpus file. More... | |
vector< string > & | get_regex_patterns_of_fns_to_keep () |
Accessor for the regex patterns describing the functions to keep into the public decl table. The other functions not matches by these regexes are dropped from the public decl table. More... | |
const vector< string > & | get_regex_patterns_of_fns_to_keep () const |
Accessor for the regex patterns describing the functions to keep into the public decl table. The other functions not matches by these regexes are dropped from the public decl table. More... | |
vector< string > & | get_regex_patterns_of_fns_to_suppress () |
Accessor for the regex patterns describing the functions to drop from the public decl table. More... | |
const vector< string > & | get_regex_patterns_of_fns_to_suppress () const |
Accessor for the regex patterns describing the functions to drop from the public decl table. More... | |
vector< string > & | get_regex_patterns_of_vars_to_keep () |
Accessor for the regex patterns describing the variables to keep into the public decl table. The other variables not matches by these regexes are dropped from the public decl table. More... | |
const vector< string > & | get_regex_patterns_of_vars_to_keep () const |
Accessor for the regex patterns describing the variables to keep into the public decl table. The other variables not matches by these regexes are dropped from the public decl table. More... | |
vector< string > & | get_regex_patterns_of_vars_to_suppress () |
Accessor for the regex patterns describing the variables to drop from the public decl table. More... | |
const vector< string > & | get_regex_patterns_of_vars_to_suppress () const |
Accessor for the regex patterns describing the variables to drop from the public decl table. More... | |
const string & | get_soname () |
Getter for the soname property of the corpus. More... | |
virtual const elf_symbols & | get_sorted_fun_symbols () const |
Return a sorted vector of function symbols for this corpus. More... | |
const elf_symbols & | get_sorted_undefined_fun_symbols () const |
Getter for a sorted vector of the function symbols undefined in this corpus. More... | |
const elf_symbols & | get_sorted_undefined_var_symbols () const |
Getter for a sorted vector of the variable symbols undefined in this corpus. More... | |
virtual const elf_symbols & | get_sorted_var_symbols () const |
Getter for the sorted vector of variable symbols for this corpus. More... | |
vector< string > & | get_sym_ids_of_fns_to_keep () |
Getter for the vector of function symbol IDs to keep. More... | |
const vector< string > & | get_sym_ids_of_fns_to_keep () const |
Getter for the vector of function symbol IDs to keep. More... | |
vector< string > & | get_sym_ids_of_vars_to_keep () |
Getter for the vector of variable symbol IDs to keep. More... | |
const vector< string > & | get_sym_ids_of_vars_to_keep () const |
Getter for the vector of variable symbol IDs to keep. More... | |
const symtab_reader::symtab_sptr & | get_symtab () const |
Getter for the symtab object. More... | |
const translation_units & | get_translation_units () const |
Return the list of translation units of the current corpus. More... | |
type_maps & | get_type_per_loc_map () |
Get the maps that associate a location string to a certain kind of type. More... | |
const type_maps & | get_type_per_loc_map () const |
Get the maps that associate a location string to a certain kind of type. More... | |
type_maps & | get_types () |
Get the maps that associate a name to a certain kind of type. More... | |
const type_maps & | get_types () const |
Get the maps that associate a name to a certain kind of type. More... | |
const vector< type_base_wptr > & | get_types_not_reachable_from_public_interfaces () const |
Getter of a sorted vector of the types that are *NOT* reachable from public interfaces. More... | |
const string_elf_symbols_map_type & | get_undefined_fun_symbol_map () const |
Getter for the map of function symbols that are undefined in this corpus. More... | |
const string_elf_symbols_map_type & | get_undefined_var_symbol_map () const |
Getter for the map of variable symbols that are undefined in this corpus. More... | |
virtual const elf_symbols & | get_unreferenced_function_symbols () const |
Getter of the set of function symbols that are not referenced by any function exported by the current corpus. More... | |
virtual const elf_symbols & | get_unreferenced_variable_symbols () const |
Getter of the set of variable symbols that are not referenced by any variable exported by the current corpus. More... | |
virtual const string_elf_symbols_map_type & | get_var_symbol_map () const |
Getter for the variable symbols map. More... | |
virtual const variables & | get_variables () const |
Return the public decl table of the global variables of the current corpus. More... | |
virtual bool | is_empty () const |
Tests if the corpus is empty from an ABI surface perspective. I.e. if all of these criteria are true: More... | |
const elf_symbol_sptr | lookup_function_symbol (const elf_symbol &symbol) const |
Look in the function symbols map for a symbol with the same name and version as a given symbol. More... | |
const elf_symbol_sptr | lookup_function_symbol (const string &n) const |
Look in the function symbols map for a symbol with a given name. More... | |
const elf_symbol_sptr | lookup_function_symbol (const string &symbol_name, const elf_symbol::version &version) const |
Look in the function symbols map for a symbol with a given name. More... | |
const std::unordered_set< function_decl * > * | lookup_functions (const char *id) const |
const std::unordered_set< function_decl * > * | lookup_functions (const interned_string &id) const |
Lookup the function which has a given function ID. More... | |
const elf_symbol_sptr | lookup_variable_symbol (const elf_symbol &symbol) const |
Look in the variable symbols map for a symbol with the same name and version as a given symbol. More... | |
const elf_symbol_sptr | lookup_variable_symbol (const string &n) const |
Look in the variable symbols map for a symbol with a given name. More... | |
const elf_symbol_sptr | lookup_variable_symbol (const string &symbol_name, const elf_symbol::version &version) const |
Look in the variable symbols map for a symbol with a given name. More... | |
void | maybe_drop_some_exported_decls () |
After the set of exported functions and variables have been built, consider all the tunables that control that set and see if some functions need to be removed from that set; if so, remove them. More... | |
bool | operator== (const corpus &) const |
Compare the current corpus against another one. More... | |
void | record_type_as_reachable_from_public_interfaces (const type_base &) |
Record a type as being reachable from public interfaces (global functions and variables). More... | |
virtual bool | recording_types_reachable_from_public_interface_supported () |
Test if the recording of reachable types (and thus, indirectly, the recording of non-reachable types) is activated for the current corpus. More... | |
void | set_architecture_name (const string &) |
Setter for the architecture name of the corpus. More... | |
void | set_format_major_version_number (const string &) |
Setter of the major version number of the abixml serialization format. More... | |
void | set_format_minor_version_number (const string &) |
Setter of the minor version number of the abixml serialization format. More... | |
void | set_needed (const vector< string > &) |
Setter of the needed property of the corpus. More... | |
void | set_origin (origin) |
Setter for the origin of the corpus. More... | |
void | set_path (const string &) |
Set the file path associated to the corpus file. More... | |
void | set_soname (const string &) |
Setter for the soname property of the corpus. More... | |
void | set_symtab (symtab_reader::symtab_sptr) |
Setter for the symtab object. More... | |
void | sort_functions () |
Sort the set of functions exported by this corpus. More... | |
void | sort_variables () |
Sort the set of variables exported by this corpus. More... | |
bool | type_is_reachable_from_public_interfaces (const type_base &) const |
Test if a type is reachable from public interfaces (global functions and variables). More... | |
Public Attributes | |
std::unique_ptr< priv > | priv_ |
Friends | |
class | corpus_group |
class | type_base |
This is the abstraction of a set of translation units (themselves seen as bundles of unitary abi artefacts like types and decls) bundled together as a corpus. A corpus is thus the Application binary interface of a program, a library or just a set of modules put together.
Definition at line 24 of file abg-corpus.h.
typedef shared_ptr<exported_decls_builder> exported_decls_builder_sptr |
Convenience typedef for shared_ptr<exported_decls_builder>.
Definition at line 39 of file abg-corpus.h.
typedef vector<const function_decl*> functions |
Convenience typedef for std::vector<abigail::ir::function_decl*>
Definition at line 31 of file abg-corpus.h.
typedef vector<string> strings_type |
A convenience typedef for std::vector<string>.
Definition at line 28 of file abg-corpus.h.
Convenience typedef for std::vector<abigail::ir::var_decl*>
Definition at line 34 of file abg-corpus.h.
enum origin |
This abstracts where the corpus comes from. That is, either it has been read from the native xml format, from DWARF or built artificially using the library's API.
Definition at line 44 of file abg-corpus.h.
corpus | ( | const ir::environment & | env, |
const string & | path = "" |
||
) |
Constructor of the corpus type.
env | the environment of the corpus. |
path | the path to the file containing the ABI corpus. |
Definition at line 672 of file abg-corpus.cc.
void add | ( | const translation_unit_sptr & | tu | ) |
Add a translation unit to the current ABI Corpus.
Note that two translation units with the same path (as returned by translation_unit::get_path) cannot be added to the same corpus. If that happens, the library aborts.
tu | the new translation unit to add. |
Definition at line 709 of file abg-corpus.cc.
bool do_log | ( | ) | const |
Test if logging was requested.
Definition at line 691 of file abg-corpus.cc.
void do_log | ( | bool | f | ) |
Request logging, or not.
f | true iff logging is requested. |
Definition at line 698 of file abg-corpus.cc.
void drop_translation_units | ( | ) |
Erase the translation units contained in this in-memory object.
Note that the on-disk archive file that contains the serialized representation of this object is not modified.
Definition at line 754 of file abg-corpus.cc.
const translation_unit_sptr find_translation_unit | ( | const string & | path | ) | const |
Find the translation unit that has a given path.
path | the path of the translation unit to look for. |
Definition at line 739 of file abg-corpus.cc.
const string & get_architecture_name | ( | ) | const |
Getter for the architecture name of the corpus.
This property is meaningful for e.g, corpora built from ELF shared library files. In that case, this is a string representation of the Elf{32,64}_Ehdr::e_machine field.
Definition at line 1035 of file abg-corpus.cc.
const environment & get_environment | ( | ) | const |
Getter of the enviroment of the corpus.
Definition at line 684 of file abg-corpus.cc.
corpus::exported_decls_builder_sptr get_exported_decls_builder | ( | ) | const |
Getter for the object that is responsible for determining what decls ought to be in the set of exported decls.
The object does have methods to add the decls to the set of exported decls, right at the place where the corpus expects it, so that there is no unnecessary copying involved.
Definition at line 1606 of file abg-corpus.cc.
string & get_format_major_version_number | ( | ) | const |
Getter of the major version number of the abixml serialization format.
Definition at line 929 of file abg-corpus.cc.
string & get_format_minor_version_number | ( | ) | const |
Getter of the minor version number of the abixml serialization format.
Definition at line 946 of file abg-corpus.cc.
|
virtual |
Getter for the function symbols map.
Reimplemented in corpus_group.
Definition at line 1119 of file abg-corpus.cc.
|
virtual |
Return the functions public decl table of the current corpus.
The function public decl tables is a vector of all the functions and member functions found in the current corpus.
Note that the caller can suppress some functions from the vector supplying regular expressions describing the set of functions she want to see removed from the public decl table by populating the vector of regular expressions returned by corpus::get_regex_patterns_of_fns_to_suppress().
Reimplemented in corpus_group.
Definition at line 1351 of file abg-corpus.cc.
corpus_group * get_group | ( | ) |
Getter of the group this corpus belongs to.
Definition at line 886 of file abg-corpus.cc.
const corpus_group * get_group | ( | ) | const |
Getter of the group this corpus is a member of.
Definition at line 878 of file abg-corpus.cc.
const vector< string > & get_needed | ( | ) | const |
Getter of the needed property of the corpus.
This property is meaningful for, e.g, corpora built from ELF shared library files. In that case, this is a vector of names of dependencies of the ELF shared library file.
Definition at line 990 of file abg-corpus.cc.
corpus::origin get_origin | ( | ) | const |
Getter for the origin of the corpus.
Definition at line 914 of file abg-corpus.cc.
string & get_path | ( | ) | const |
Get the file path associated to the corpus file.
A subsequent call to corpus::read will deserialize the content of the abi file expected at this path; likewise, a call to corpus::write will serialize the translation units contained in the corpus object into the on-disk file at this path.
Definition at line 967 of file abg-corpus.cc.
vector< string > & get_regex_patterns_of_fns_to_keep | ( | ) |
Accessor for the regex patterns describing the functions to keep into the public decl table. The other functions not matches by these regexes are dropped from the public decl table.
Definition at line 1492 of file abg-corpus.cc.
const vector< string > & get_regex_patterns_of_fns_to_keep | ( | ) | const |
Accessor for the regex patterns describing the functions to keep into the public decl table. The other functions not matches by these regexes are dropped from the public decl table.
Definition at line 1502 of file abg-corpus.cc.
vector< string > & get_regex_patterns_of_fns_to_suppress | ( | ) |
Accessor for the regex patterns describing the functions to drop from the public decl table.
Definition at line 1455 of file abg-corpus.cc.
const vector< string > & get_regex_patterns_of_fns_to_suppress | ( | ) | const |
Accessor for the regex patterns describing the functions to drop from the public decl table.
Definition at line 1464 of file abg-corpus.cc.
vector< string > & get_regex_patterns_of_vars_to_keep | ( | ) |
Accessor for the regex patterns describing the variables to keep into the public decl table. The other variables not matches by these regexes are dropped from the public decl table.
Definition at line 1532 of file abg-corpus.cc.
const vector< string > & get_regex_patterns_of_vars_to_keep | ( | ) | const |
Accessor for the regex patterns describing the variables to keep into the public decl table. The other variables not matches by these regexes are dropped from the public decl table.
Definition at line 1542 of file abg-corpus.cc.
vector< string > & get_regex_patterns_of_vars_to_suppress | ( | ) |
Accessor for the regex patterns describing the variables to drop from the public decl table.
Definition at line 1473 of file abg-corpus.cc.
const vector< string > & get_regex_patterns_of_vars_to_suppress | ( | ) | const |
Accessor for the regex patterns describing the variables to drop from the public decl table.
Definition at line 1482 of file abg-corpus.cc.
const string & get_soname | ( | ) |
Getter for the soname property of the corpus.
This property is meaningful for, e.g, corpora built from ELF shared library files. In that case, this is the shared object name exported by the shared library.
Definition at line 1013 of file abg-corpus.cc.
|
virtual |
Return a sorted vector of function symbols for this corpus.
Note that the first time this function is called, the symbols are sorted and cached. Subsequent invocations of this function return the cached vector that was built previously.
Reimplemented in corpus_group.
Definition at line 1140 of file abg-corpus.cc.
const elf_symbols & get_sorted_undefined_fun_symbols | ( | ) | const |
Getter for a sorted vector of the function symbols undefined in this corpus.
Definition at line 1149 of file abg-corpus.cc.
const elf_symbols & get_sorted_undefined_var_symbols | ( | ) | const |
Getter for a sorted vector of the variable symbols undefined in this corpus.
Definition at line 1169 of file abg-corpus.cc.
|
virtual |
Getter for the sorted vector of variable symbols for this corpus.
Note that the first time this function is called, it computes the sorted vector, caches the result and returns it. Subsequent invocations of this function just return the cached vector.
Reimplemented in corpus_group.
Definition at line 1160 of file abg-corpus.cc.
vector< string > & get_sym_ids_of_fns_to_keep | ( | ) |
Getter for the vector of function symbol IDs to keep.
A symbol ID is a string made of the name of the symbol and its version, separated by one or two '@'.
Definition at line 1512 of file abg-corpus.cc.
const vector< string > & get_sym_ids_of_fns_to_keep | ( | ) | const |
Getter for the vector of function symbol IDs to keep.
A symbol ID is a string made of the name of the symbol and its version, separated by one or two '@'.
Definition at line 1522 of file abg-corpus.cc.
vector< string > & get_sym_ids_of_vars_to_keep | ( | ) |
Getter for the vector of variable symbol IDs to keep.
A symbol ID is a string made of the name of the symbol and its version, separated by one or two '@'.
Definition at line 1552 of file abg-corpus.cc.
const vector< string > & get_sym_ids_of_vars_to_keep | ( | ) | const |
Getter for the vector of variable symbol IDs to keep.
A symbol ID is a string made of the name of the symbol and its version, separated by one or two '@'.
Definition at line 1562 of file abg-corpus.cc.
const symtab_reader::symtab_sptr & get_symtab | ( | ) | const |
Getter for the symtab object.
Definition at line 1112 of file abg-corpus.cc.
const translation_units & get_translation_units | ( | ) | const |
Return the list of translation units of the current corpus.
Definition at line 729 of file abg-corpus.cc.
type_maps & get_type_per_loc_map | ( | ) |
Get the maps that associate a location string to a certain kind of type.
The location string is the result of the invocation to the function abigail::ir::location::expand(). It has the form "file.c:4:1", with 'file.c' being the file name, '4' being the line number and '1' being the column number.
Definition at line 870 of file abg-corpus.cc.
const type_maps & get_type_per_loc_map | ( | ) | const |
Get the maps that associate a location string to a certain kind of type.
The location string is the result of the invocation to the function abigail::ir::location::expand(). It has the form "file.c:4:1", with 'file.c' being the file name, '4' being the line number and '1' being the column number.
Definition at line 782 of file abg-corpus.cc.
type_maps & get_types | ( | ) |
Get the maps that associate a name to a certain kind of type.
Definition at line 761 of file abg-corpus.cc.
const type_maps & get_types | ( | ) | const |
Get the maps that associate a name to a certain kind of type.
Definition at line 769 of file abg-corpus.cc.
const vector< type_base_wptr > & get_types_not_reachable_from_public_interfaces | ( | ) | const |
Getter of a sorted vector of the types that are *NOT* reachable from public interfaces.
Note that for this to be non-empty, the libabigail reader that analyzed the input (be it a binary or an abixml file) must have be configured to load types that are not reachable from public interfaces.
Definition at line 841 of file abg-corpus.cc.
const string_elf_symbols_map_type & get_undefined_fun_symbol_map | ( | ) | const |
Getter for the map of function symbols that are undefined in this corpus.
Definition at line 1129 of file abg-corpus.cc.
const string_elf_symbols_map_type & get_undefined_var_symbol_map | ( | ) | const |
Getter for the map of variable symbols that are undefined in this corpus.
Definition at line 1186 of file abg-corpus.cc.
|
virtual |
Getter of the set of function symbols that are not referenced by any function exported by the current corpus.
When the corpus has been created from an ELF library or program, this function returns the set of function symbols not referenced by any debug information.
Reimplemented in corpus_group.
Definition at line 1433 of file abg-corpus.cc.
|
virtual |
Getter of the set of variable symbols that are not referenced by any variable exported by the current corpus.
When the corpus has been created from an ELF library or program, this function returns the set of variable symbols not referenced by any debug information.
Reimplemented in corpus_group.
Definition at line 1446 of file abg-corpus.cc.
|
virtual |
Getter for the variable symbols map.
Reimplemented in corpus_group.
Definition at line 1176 of file abg-corpus.cc.
|
virtual |
Return the public decl table of the global variables of the current corpus.
The variable public decls table is a vector of all the public global variables and static member variables found in the current corpus.
Note that the caller can suppress some variables from the vector supplying regular expressions describing the set of variables she wants to see removed from the public decl table by populating the vector of regular expressions returned by corpus::get_regex_patterns_of_fns_to_suppress().
Reimplemented in corpus_group.
Definition at line 1409 of file abg-corpus.cc.
|
virtual |
Tests if the corpus is empty from an ABI surface perspective. I.e. if all of these criteria are true:
Reimplemented in corpus_group.
Definition at line 1059 of file abg-corpus.cc.
const elf_symbol_sptr lookup_function_symbol | ( | const elf_symbol & | symbol | ) | const |
Look in the function symbols map for a symbol with the same name and version as a given symbol.
symbol | the symbol to look for. |
return the symbol with the same name and version as symbol
.
Definition at line 1282 of file abg-corpus.cc.
const elf_symbol_sptr lookup_function_symbol | ( | const string & | n | ) | const |
Look in the function symbols map for a symbol with a given name.
n | the name of the symbol to look for. |
return the first symbol with the name n
.
Definition at line 1195 of file abg-corpus.cc.
const elf_symbol_sptr lookup_function_symbol | ( | const string & | symbol_name, |
const elf_symbol::version & | version | ||
) | const |
Look in the function symbols map for a symbol with a given name.
symbol_name | the name of the symbol to look for. |
version | the version of the symbol to look for. |
return the symbol with name symbol_name
and with version version
, or nil if no symbol has been found with that name and version.
Definition at line 1261 of file abg-corpus.cc.
const std::unordered_set< function_decl * > * lookup_functions | ( | const char * | id | ) | const |
Definition at line 1373 of file abg-corpus.cc.
const std::unordered_set< function_decl * > * lookup_functions | ( | const interned_string & | id | ) | const |
Lookup the function which has a given function ID.
Note that there can have been several functions with the same ID. This is because debug info can declare the same function in several different translation units. Normally, all these function should be equal. But still, this function returns all these functions.
id | the ID of the function to lookup. This ID must be either the result of invoking function::get_id() of elf_symbol::get_id_string(). |
id
, or nil if no function with that ID was found. Definition at line 1369 of file abg-corpus.cc.
const elf_symbol_sptr lookup_variable_symbol | ( | const elf_symbol & | symbol | ) | const |
Look in the variable symbols map for a symbol with the same name and version as a given symbol.
symbol | the symbol to look for. |
return the symbol with the same name and version as symbol
.
Definition at line 1333 of file abg-corpus.cc.
const elf_symbol_sptr lookup_variable_symbol | ( | const string & | n | ) | const |
Look in the variable symbols map for a symbol with a given name.
n | the name of the symbol to look for. |
return the first symbol with the name n
.
Definition at line 1291 of file abg-corpus.cc.
const elf_symbol_sptr lookup_variable_symbol | ( | const string & | symbol_name, |
const elf_symbol::version & | version | ||
) | const |
Look in the variable symbols map for a symbol with a given name.
symbol_name | the name of the symbol to look for. |
symbol_version | the version of the symbol to look for. |
return the first symbol with the name symbol_name
and with version version
.
Definition at line 1312 of file abg-corpus.cc.
void maybe_drop_some_exported_decls | ( | ) |
After the set of exported functions and variables have been built, consider all the tunables that control that set and see if some functions need to be removed from that set; if so, remove them.
Definition at line 1569 of file abg-corpus.cc.
bool operator== | ( | const corpus & | other | ) | const |
Compare the current corpus against another one.
other | the other corpus to compare against. |
Definition at line 1086 of file abg-corpus.cc.
void record_type_as_reachable_from_public_interfaces | ( | const type_base & | t | ) |
Record a type as being reachable from public interfaces (global functions and variables).
t | the type to record as reachable. |
Definition at line 803 of file abg-corpus.cc.
|
virtual |
Test if the recording of reachable types (and thus, indirectly, the recording of non-reachable types) is activated for the current corpus.
Reimplemented in corpus_group.
Definition at line 792 of file abg-corpus.cc.
void set_architecture_name | ( | const string & | arch | ) |
Setter for the architecture name of the corpus.
This property is meaningful for e.g, corpora built from ELF shared library files. In that case, this is a string representation of the Elf{32,64}_Ehdr::e_machine field.
arch | the architecture name string. |
Definition at line 1046 of file abg-corpus.cc.
void set_format_major_version_number | ( | const string & | maj | ) |
Setter of the major version number of the abixml serialization format.
maj | the new major version numberof the abixml format. |
Definition at line 937 of file abg-corpus.cc.
void set_format_minor_version_number | ( | const string & | min | ) |
Setter of the minor version number of the abixml serialization format.
min | the new minor version number of the abixml serialization format. |
Definition at line 955 of file abg-corpus.cc.
void set_needed | ( | const vector< string > & | needed | ) |
Setter of the needed property of the corpus.
This property is meaningful for, e.g, corpora built from ELF shared library files. In that case, this is a vector of names of dependencies of the ELF shared library file.
needed | the new vector of dependencies needed by this corpus. |
Definition at line 1002 of file abg-corpus.cc.
void set_origin | ( | origin | o | ) |
Setter for the origin of the corpus.
o | the new origin for the corpus. |
Definition at line 921 of file abg-corpus.cc.
void set_path | ( | const string & | path | ) |
Set the file path associated to the corpus file.
A subsequent call to corpus::read will deserialize the content of the abi file expected at this path; likewise, a call to corpus::write will serialize the translation units contained in the corpus object into the on-disk file at this path.
path | the new file path to assciate to the current corpus. |
Definition at line 979 of file abg-corpus.cc.
void set_soname | ( | const string & | soname | ) |
Setter for the soname property of the corpus.
This property is meaningful for, e.g, corpora built from ELF shared library files. In that case, this is the shared object name exported by the shared library.
soname | the new soname property of the corpus. |
Definition at line 1024 of file abg-corpus.cc.
void set_symtab | ( | symtab_reader::symtab_sptr | symtab | ) |
Setter for the symtab object.
symtab | a shared pointer to the new symtab object |
Definition at line 1105 of file abg-corpus.cc.
void sort_functions | ( | ) |
Sort the set of functions exported by this corpus.
Normally, you shouldn't be calling this as the code that creates the corpus for you should do it for you too.
Definition at line 1387 of file abg-corpus.cc.
void sort_variables | ( | ) |
Sort the set of variables exported by this corpus.
Normally, you shouldn't be calling this as the code that creates the corpus for you should do it for you too.
Definition at line 1417 of file abg-corpus.cc.
bool type_is_reachable_from_public_interfaces | ( | const type_base & | t | ) | const |
Test if a type is reachable from public interfaces (global functions and variables).
For a type to be considered reachable from public interfaces, it must have been previously marked as such by calling corpus::record_type_as_reachable_from_public_interfaces.
t | the type to test for. |
t
is reachable from public interfaces. Definition at line 821 of file abg-corpus.cc.
|
friend |
Definition at line 285 of file abg-corpus.h.
|
friend |
Definition at line 284 of file abg-corpus.h.
std::unique_ptr<priv> priv_ |
Definition at line 63 of file abg-corpus.h.