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

The private data of the corpus type. More...

#include <abg-corpus-priv.h>

Public Member Functions

 priv (const string &p, const environment &e)
 
 ~priv ()
 Destructor of the corpus::priv type. More...
 
const string_elf_symbols_map_typeget_fun_symbol_map () const
 Return a map from name to function symbol for this corpus. More...
 
unordered_set< interned_string, hash_interned_string > * get_public_types_pretty_representations ()
 Getter of the set of pretty representation of types that are reachable from public interfaces (global functions and variables). More...
 
const elf_symbolsget_sorted_fun_symbols () const
 Return a sorted vector of function symbols for this corpus. More...
 
const elf_symbolsget_sorted_undefined_fun_symbols () const
 Getter for a sorted vector of the function symbols undefined in this corpus. More...
 
const elf_symbolsget_sorted_undefined_var_symbols () const
 Getter for a sorted vector of the variable symbols undefined in this corpus. More...
 
const elf_symbolsget_sorted_var_symbols () const
 Getter for the sorted vector of variable symbols for this corpus. More...
 
type_mapsget_types ()
 Get the maps that associate a name to a certain kind of type. More...
 
const type_mapsget_types () const
 Get the maps that associate a name to a certain kind of type. More...
 
const string_elf_symbols_map_typeget_undefined_fun_symbol_map () const
 Return a map from name to undefined function symbol for this corpus. More...
 
const string_elf_symbols_map_typeget_undefined_var_symbol_map () const
 Return a map from name to undefined variable symbol for this corpus. More...
 
const elf_symbolsget_unreferenced_function_symbols () const
 Return a list of symbols that are not referenced by any function of corpus::get_functions(). More...
 
const elf_symbolsget_unreferenced_variable_symbols () const
 Return a list of symbols that are not referenced by any variable of corpus::get_variables(). More...
 
const string_elf_symbols_map_typeget_var_symbol_map () const
 Return a map from name to variable symbol for this corpus. More...
 
std::unordered_set< function_decl * > * lookup_functions (const interned_string &id)
 Lookup the function which has a given function ID. More...
 

Public Attributes

string architecture_name
 
unordered_map< string, type_base_sptr > canonical_types_
 
bool do_log
 
const environmentenv
 
corpus::exported_decls_builder_sptr exported_decls_builder
 
vector< const function_decl * > fns
 
string format_major_version_number_
 
string format_minor_version_number_
 
corpus_groupgroup
 
translation_units members
 
vector< string > needed
 
corpus::origin origin_
 
string path
 
string_tu_map_type path_tu_map
 
unordered_set< interned_string, hash_interned_string > * pub_type_pretty_reprs_
 
vector< string > regex_patterns_fns_to_keep
 
vector< string > regex_patterns_fns_to_suppress
 
vector< string > regex_patterns_vars_to_keep
 
vector< string > regex_patterns_vars_to_suppress
 
string soname
 
functions sorted_undefined_fns
 
variables sorted_undefined_vars
 
vector< string > sym_id_fns_to_keep
 
vector< string > sym_id_vars_to_keep
 
symtab_reader::symtab_sptr symtab_
 
type_maps type_per_loc_map_
 
type_maps types_
 
vector< type_base_wptrtypes_not_reachable_from_pub_ifaces_
 
functions_set undefined_fns
 
variables_set undefined_vars
 
vector< var_decl_sptrvars
 

Detailed Description

The private data of the corpus type.

Definition at line 815 of file abg-corpus-priv.h.

Constructor & Destructor Documentation

◆ priv()

priv ( const string &  p,
const environment e 
)
inline

Definition at line 875 of file abg-corpus-priv.h.

◆ ~priv()

~priv ( )

Destructor of the corpus::priv type.

Definition at line 681 of file abg-corpus.cc.

Member Function Documentation

◆ get_fun_symbol_map()

const string_elf_symbols_map_type & get_fun_symbol_map ( ) const

Return a map from name to function symbol for this corpus.

Note that the first time this function is called, the map is built. Subsequent invocations of this function return the cached map that was built previously.

Returns
the name function symbol map

Definition at line 379 of file abg-corpus.cc.

◆ get_public_types_pretty_representations()

unordered_set< interned_string, hash_interned_string > * get_public_types_pretty_representations ( )

Getter of the set of pretty representation of types that are reachable from public interfaces (global functions and variables).

Returns
the set of pretty representation of types that are reachable from public interfaces (global functions and variables).

Definition at line 641 of file abg-corpus.cc.

◆ get_sorted_fun_symbols()

const elf_symbols & get_sorted_fun_symbols ( ) const

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.

Returns
the sorted list of function symbols.

Definition at line 354 of file abg-corpus.cc.

◆ get_sorted_undefined_fun_symbols()

const elf_symbols & get_sorted_undefined_fun_symbols ( ) const

Getter for a sorted vector of the function symbols undefined in this corpus.

Returns
a vector of the function symbols undefined in this corpus, sorted by name and then version.

Definition at line 396 of file abg-corpus.cc.

◆ get_sorted_undefined_var_symbols()

const elf_symbols & get_sorted_undefined_var_symbols ( ) const

Getter for a sorted vector of the variable symbols undefined in this corpus.

Returns
a vector of the variable symbols undefined in this corpus, sorted by name and then version.

Definition at line 541 of file abg-corpus.cc.

◆ get_sorted_var_symbols()

const elf_symbols & get_sorted_var_symbols ( ) const

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.

Returns
the sorted vector of variable symbols for this corpus.

Definition at line 498 of file abg-corpus.cc.

◆ get_types() [1/2]

type_maps & get_types ( )

Get the maps that associate a name to a certain kind of type.

Definition at line 338 of file abg-corpus.cc.

◆ get_types() [2/2]

const type_maps & get_types ( ) const

Get the maps that associate a name to a certain kind of type.

Definition at line 343 of file abg-corpus.cc.

◆ get_undefined_fun_symbol_map()

const string_elf_symbols_map_type & get_undefined_fun_symbol_map ( ) const

Return a map from name to undefined function symbol for this corpus.

Note that the first time this function is called, the map is built. Subsequent invocations of this function return the cached map that was built previously.

Returns
the name function symbol map for undefined symbols

Definition at line 424 of file abg-corpus.cc.

◆ get_undefined_var_symbol_map()

const string_elf_symbols_map_type & get_undefined_var_symbol_map ( ) const

Return a map from name to undefined variable symbol for this corpus.

Note that the first time this function is called, the map is built. Subsequent invocations of this function return the cached map that was built previously.

Returns
the name undefined variable symbol map

Definition at line 569 of file abg-corpus.cc.

◆ get_unreferenced_function_symbols()

const elf_symbols & get_unreferenced_function_symbols ( ) const

Return a list of symbols that are not referenced by any function of corpus::get_functions().

Note that this function considers the list of function symbols to keep, that is provided by corpus::get_sym_ids_of_fns_to_keep(). If a given unreferenced function symbol is not in the list of functions to keep, then that symbol is dropped and will not be part of the resulting table of unreferenced symbol that is built.

Returns
list of symbols that are not referenced by any function

Definition at line 446 of file abg-corpus.cc.

◆ get_unreferenced_variable_symbols()

const elf_symbols & get_unreferenced_variable_symbols ( ) const

Return a list of symbols that are not referenced by any variable of corpus::get_variables().

Note that this function considers the list of variable symbols to keep, that is provided by corpus::get_sym_ids_of_vars_to_keep(). If a given unreferenced variable symbol is not in the list of variable to keep, then that symbol is dropped and will not be part of the resulting table of unreferenced symbol that is built.

Returns
list of symbols that are not referenced by any variable

Definition at line 591 of file abg-corpus.cc.

◆ get_var_symbol_map()

const string_elf_symbols_map_type & get_var_symbol_map ( ) const

Return a map from name to variable symbol for this corpus.

Note that the first time this function is called, the map is built. Subsequent invocations of this function return the cached map that was built previously.

Returns
the name variable symbol map

Definition at line 524 of file abg-corpus.cc.

◆ lookup_functions()

std::unordered_set< function_decl * > * lookup_functions ( const interned_string id)

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.

Parameters
idthe ID of the function to lookup. This ID must be either the result of invoking function::get_id() of elf_symbol::get_id_string().
Returns
the set of functions which ID is id, or nil if no function with that ID was found.

Definition at line 667 of file abg-corpus.cc.

Member Data Documentation

◆ architecture_name

string architecture_name

Definition at line 833 of file abg-corpus-priv.h.

◆ canonical_types_

unordered_map<string, type_base_sptr> canonical_types_
mutable

Definition at line 817 of file abg-corpus-priv.h.

◆ do_log

bool do_log

Definition at line 858 of file abg-corpus-priv.h.

◆ env

const environment& env

Definition at line 820 of file abg-corpus-priv.h.

◆ exported_decls_builder

Definition at line 822 of file abg-corpus-priv.h.

◆ fns

vector<const function_decl*> fns

Definition at line 836 of file abg-corpus-priv.h.

◆ format_major_version_number_

string format_major_version_number_

Definition at line 818 of file abg-corpus-priv.h.

◆ format_minor_version_number_

string format_minor_version_number_

Definition at line 819 of file abg-corpus-priv.h.

◆ group

corpus_group* group

Definition at line 821 of file abg-corpus-priv.h.

◆ members

Definition at line 834 of file abg-corpus-priv.h.

◆ needed

vector<string> needed

Definition at line 831 of file abg-corpus-priv.h.

◆ origin_

corpus::origin origin_

Definition at line 823 of file abg-corpus-priv.h.

◆ path

string path

Definition at line 830 of file abg-corpus-priv.h.

◆ path_tu_map

string_tu_map_type path_tu_map

Definition at line 835 of file abg-corpus-priv.h.

◆ pub_type_pretty_reprs_

unordered_set<interned_string, hash_interned_string>* pub_type_pretty_reprs_

Definition at line 857 of file abg-corpus-priv.h.

◆ regex_patterns_fns_to_keep

vector<string> regex_patterns_fns_to_keep

Definition at line 826 of file abg-corpus-priv.h.

◆ regex_patterns_fns_to_suppress

vector<string> regex_patterns_fns_to_suppress

Definition at line 824 of file abg-corpus-priv.h.

◆ regex_patterns_vars_to_keep

vector<string> regex_patterns_vars_to_keep

Definition at line 827 of file abg-corpus-priv.h.

◆ regex_patterns_vars_to_suppress

vector<string> regex_patterns_vars_to_suppress

Definition at line 825 of file abg-corpus-priv.h.

◆ soname

string soname

Definition at line 832 of file abg-corpus-priv.h.

◆ sorted_undefined_fns

functions sorted_undefined_fns

Definition at line 839 of file abg-corpus-priv.h.

◆ sorted_undefined_vars

variables sorted_undefined_vars

Definition at line 841 of file abg-corpus-priv.h.

◆ sym_id_fns_to_keep

vector<string> sym_id_fns_to_keep

Definition at line 828 of file abg-corpus-priv.h.

◆ sym_id_vars_to_keep

vector<string> sym_id_vars_to_keep

Definition at line 829 of file abg-corpus-priv.h.

◆ symtab_

Definition at line 842 of file abg-corpus-priv.h.

◆ type_per_loc_map_

type_maps type_per_loc_map_

Definition at line 855 of file abg-corpus-priv.h.

◆ types_

type_maps types_

Definition at line 854 of file abg-corpus-priv.h.

◆ types_not_reachable_from_pub_ifaces_

vector<type_base_wptr> types_not_reachable_from_pub_ifaces_
mutable

Definition at line 856 of file abg-corpus-priv.h.

◆ undefined_fns

functions_set undefined_fns

Definition at line 838 of file abg-corpus-priv.h.

◆ undefined_vars

variables_set undefined_vars

Definition at line 840 of file abg-corpus-priv.h.

◆ vars

vector<var_decl_sptr> vars

Definition at line 837 of file abg-corpus-priv.h.


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