libabigail
|
The base class of all libabigail front-ends: The Front End Interface. More...
#include <abg-fe-iface.h>
Classes | |
struct | options_type |
The generic options that control the behaviour of all Front-End interfaces. More... | |
Public Types | |
enum | status { STATUS_UNKNOWN , STATUS_OK , STATUS_DEBUG_INFO_NOT_FOUND , STATUS_ALT_DEBUG_INFO_NOT_FOUND , STATUS_NO_SYMBOLS_FOUND } |
The status of the fe_iface::read_corpus call. More... | |
Public Member Functions | |
fe_iface (const std::string &corpus_path, environment &e) | |
Constructor of the type fe_iface. More... | |
~fe_iface () | |
Desctructor of the Front End Interface. More... | |
void | add_suppressions (const suppr::suppressions_type &) |
Add suppressions specifications to the set of suppressions to be used during the construction of the ABI internal representation (the ABI corpus) from the input file. More... | |
corpus_sptr | corpus () |
Getter for the ABI corpus being built by the current front-end. More... | |
const corpus_sptr | corpus () const |
Getter for the ABI corpus being built by the current front-end. More... | |
corpus_group_sptr & | corpus_group () |
Getter for the ABI corpus group being built by the current front-end. More... | |
const corpus_group_sptr & | corpus_group () const |
Getter for the ABI corpus group being built by the current front-end. More... | |
void | corpus_group (const ir::corpus_group_sptr &cg) |
Setter for the ABI corpus group being built by the current front-end. More... | |
const std::string & | corpus_path () const |
Getter of the path to the file which an ABI corpus is to be created for. More... | |
void | corpus_path (const std::string &) |
Setter of the path to the file which an ABI corpus is to be created for. More... | |
bool | current_corpus_is_main_corpus_from_current_group () |
Test if the current corpus being built is the main corpus of the current corpus group. More... | |
const string & | dt_soname () const |
Getter for the SONAME of the analyzed binary. More... | |
void | dt_soname (const string &) |
Getter for the SONAME of the analyzed binary. More... | |
bool | has_corpus_group () const |
Test if there is a corpus group being built. More... | |
bool | load_in_linux_kernel_mode () const |
Test if the input binary is to be considered as a Linux Kernel binary. More... | |
corpus_sptr | main_corpus_from_current_group () |
Return the main corpus from the current corpus group, if any. More... | |
void | maybe_add_fn_to_exported_decls (const function_decl *fn) |
Try and add the representation of the ABI of a function to the set of exported declarations of the current corpus. More... | |
void | maybe_add_var_to_exported_decls (const var_decl *var) |
Try and add the representation of the ABI of a variable to the set of exported declarations of the current corpus. More... | |
options_type & | options () |
Getter of the the options of the current Front End Interface. More... | |
const options_type & | options () const |
Getter of the the options of the current Front End Interface. More... | |
virtual ir::corpus_sptr | read_corpus (status &status)=0 |
void | reset (const std::string &corpus_path, environment &e) |
Re-initialize the current Front End. More... | |
corpus_sptr | should_reuse_type_from_corpus_group () |
Return true if the current corpus is part of a corpus group being built and if it's not the main corpus of the group. More... | |
suppr::suppressions_type & | suppressions () |
Getter of the vector of suppression specifications associated with the current front-end. More... | |
const suppr::suppressions_type & | suppressions () const |
Getter of the vector of suppression specifications associated with the current front-end. More... | |
void | suppressions (suppr::suppressions_type &) |
Setter of the vector of suppression specifications associated with the current front-end. More... | |
Protected Attributes | |
priv * | priv_ |
The base class of all libabigail front-ends: The Front End Interface.
A front end reads a given type of binary format and constructs a libagbigail internal representation from it.
The middle-end then manipulates that IR.
Definition at line 28 of file abg-fe-iface.h.
enum status |
The status of the fe_iface::read_corpus call.
Definition at line 37 of file abg-fe-iface.h.
fe_iface | ( | const std::string & | corpus_path, |
environment & | e | ||
) |
Constructor of the type fe_iface.
corpus_path | the path to the file represented by the ABI corpus that is going to be built by this Front End. |
e | the environment in which the Front End operates. |
Definition at line 68 of file abg-fe-iface.cc.
~fe_iface | ( | ) |
Desctructor of the Front End Interface.
Definition at line 74 of file abg-fe-iface.cc.
void add_suppressions | ( | const suppr::suppressions_type & | supprs | ) |
Add suppressions specifications to the set of suppressions to be used during the construction of the ABI internal representation (the ABI corpus) from the input file.
During the construction of the ABI corpus, ABI artifacts that match a given suppression specification are dropped on the floor; that is, they are discarded and won't be part of the final ABI corpus. This is a way to reduce the amount of data held by the final ABI corpus.
Note that the suppression specifications provided to this function are only considered during the construction of the ABI corpus. For instance, they are not taken into account during e.g comparisons of two ABI corpora that might happen later. If you want to apply suppression specificatins to the comparison (or reporting) of ABI corpora please refer to the documentation of the diff_context type to learn how to set suppressions that are to be used in that context.
supprs | the suppression specifications to be applied during the construction of the ABI corpus. |
Definition at line 195 of file abg-fe-iface.cc.
corpus_sptr corpus | ( | ) |
Getter for the ABI corpus being built by the current front-end.
Definition at line 206 of file abg-fe-iface.cc.
const corpus_sptr corpus | ( | ) | const |
Getter for the ABI corpus being built by the current front-end.
Definition at line 220 of file abg-fe-iface.cc.
corpus_group_sptr & corpus_group | ( | ) |
Getter for the ABI corpus group being built by the current front-end.
Definition at line 227 of file abg-fe-iface.cc.
const corpus_group_sptr & corpus_group | ( | ) | const |
Getter for the ABI corpus group being built by the current front-end.
Definition at line 234 of file abg-fe-iface.cc.
void corpus_group | ( | const ir::corpus_group_sptr & | cg | ) |
Setter for the ABI corpus group being built by the current front-end.
cg | the new ABI corpus group being built by the current front-end. |
Definition at line 243 of file abg-fe-iface.cc.
const std::string & corpus_path | ( | ) | const |
Getter of the path to the file which an ABI corpus is to be created for.
Definition at line 111 of file abg-fe-iface.cc.
void corpus_path | ( | const std::string & | p | ) |
Setter of the path to the file which an ABI corpus is to be created for.
p | the new path to the file which an ABI corpus is to be created for. |
Definition at line 120 of file abg-fe-iface.cc.
bool current_corpus_is_main_corpus_from_current_group | ( | ) |
Test if the current corpus being built is the main corpus of the current corpus group.
Definition at line 271 of file abg-fe-iface.cc.
const string & dt_soname | ( | ) | const |
Getter for the SONAME of the analyzed binary.
Definition at line 127 of file abg-fe-iface.cc.
void dt_soname | ( | const string & | soname | ) |
Getter for the SONAME of the analyzed binary.
Definition at line 134 of file abg-fe-iface.cc.
bool has_corpus_group | ( | ) | const |
Test if there is a corpus group being built.
Definition at line 250 of file abg-fe-iface.cc.
bool load_in_linux_kernel_mode | ( | ) | const |
Test if the input binary is to be considered as a Linux Kernel binary.
Definition at line 143 of file abg-fe-iface.cc.
corpus_sptr main_corpus_from_current_group | ( | ) |
Return the main corpus from the current corpus group, if any.
Definition at line 258 of file abg-fe-iface.cc.
void maybe_add_fn_to_exported_decls | ( | const function_decl * | fn | ) |
Try and add the representation of the ABI of a function to the set of exported declarations of the current corpus.
fn | the internal representation of the ABI of a function. |
Definition at line 308 of file abg-fe-iface.cc.
void maybe_add_var_to_exported_decls | ( | const var_decl * | var | ) |
Try and add the representation of the ABI of a variable to the set of exported declarations of the current corpus.
var | the internal representation of the ABI of a variable. |
Definition at line 321 of file abg-fe-iface.cc.
fe_iface::options_type & options | ( | ) |
Getter of the the options of the current Front End Interface.
Definition at line 102 of file abg-fe-iface.cc.
const fe_iface::options_type & options | ( | ) | const |
Getter of the the options of the current Front End Interface.
Definition at line 95 of file abg-fe-iface.cc.
void reset | ( | const std::string & | corpus_path, |
environment & | e | ||
) |
Re-initialize the current Front End.
corpus_path | the path to the file for which a new corpus is to be created. |
e | the environment in which the Front End operates. |
Definition at line 84 of file abg-fe-iface.cc.
corpus_sptr should_reuse_type_from_corpus_group | ( | ) |
Return true if the current corpus is part of a corpus group being built and if it's not the main corpus of the group.
For instance, this would return true if we are loading a linux kernel *module* that is part of the current corpus group that is being built. In this case, it means we should re-use types coming from the "vmlinux" binary that is the main corpus of the group.
Definition at line 293 of file abg-fe-iface.cc.
suppr::suppressions_type & suppressions | ( | ) |
Getter of the vector of suppression specifications associated with the current front-end.
Definition at line 152 of file abg-fe-iface.cc.
const suppr::suppressions_type & suppressions | ( | ) | const |
Getter of the vector of suppression specifications associated with the current front-end.
Definition at line 161 of file abg-fe-iface.cc.
void suppressions | ( | suppr::suppressions_type & | supprs | ) |
Setter of the vector of suppression specifications associated with the current front-end.
supprs | the new vector of suppression specifications associated with the current front-end. |
Definition at line 170 of file abg-fe-iface.cc.
|
protected |
Definition at line 32 of file abg-fe-iface.h.