libabigail
|
The abstraction of a variable suppression specification. More...
#include <abg-suppression.h>
Classes | |
struct | priv |
The type of the private data of the variable_suppression type. More... | |
Public Types | |
enum | change_kind { UNDEFINED_CHANGE_KIND , VARIABLE_SUBTYPE_CHANGE_KIND , ADDED_VARIABLE_CHANGE_KIND , DELETED_VARIABLE_CHANGE_KIND , ALL_CHANGE_KIND } |
The kind of change the current variable suppression should apply to. More... | |
Public Member Functions | |
variable_suppression (const string &label="", const string &name="", const string &name_regex_str="", const string &symbol_name="", const string &symbol_name_regex_str="", const string &symbol_version="", const string &symbol_version_regex_str="", const string &type_name="", const string &type_name_regex_str="") | |
Constructor for the variable_suppression type. More... | |
virtual | ~variable_suppression () |
Virtual destructor for the @erf variable_suppression type. variable_suppression type. More... | |
change_kind | get_change_kind () const |
Getter of the "change_king" property. More... | |
const string & | get_name () const |
Getter for the name of the variable the user wants the current specification to designate. This property might be empty, in which case it's ignored at evaluation time. More... | |
const string & | get_name_not_regex_str () const |
Getter for the "name_not_regexp" property of the specification. More... | |
const string & | get_name_regex_str () const |
Getter for the regular expression for a family of names of variables the user wants the current specification to designate. If the variable name as returned by variable_suppression::get_name() is not empty, then this property is ignored at evaluation time. This property might be empty, in which case it's ignored at evaluation time. More... | |
const string & | get_symbol_name () const |
Getter for the name of the symbol of the variable the user wants the current specification to designate. More... | |
const string & | get_symbol_name_not_regex_str () const |
Getter for a regular expression for a family of names of symbols of variables the user wants this specification to designate. More... | |
const string & | get_symbol_name_regex_str () const |
Getter of the regular expression for a family of symbol names of the variables this specification is about to designate. More... | |
const string & | get_symbol_version () const |
Getter for the version of the symbol of the variable the user wants the current specification to designate. This property might be empty, in which case it's ignored at evaluation time. More... | |
const string & | get_symbol_version_regex_str () const |
Getter of the regular expression for a family of versions of symbol for the variables the user wants the current specification to designate. If symbol_version is not empty, then this property is ignored at evaluation time. This property might be empty, in which case it's ignored at evaluation time. More... | |
const string & | get_type_name () const |
Getter for the name of the type of the variable the user wants the current specification to designate. More... | |
const string & | get_type_name_regex_str () const |
Getter for the regular expression for a family of type names of variables the user wants the current specification to designate. More... | |
void | set_change_kind (change_kind k) |
Setter of the "change_kind" property. More... | |
void | set_name (const string &) |
Setter for the name of the variable the user wants the current specification to designate. This property might be empty, in which case it's ignored at evaluation time. More... | |
void | set_name_not_regex_str (const string &) |
Setter for the "name_not_regexp" property of the specification. More... | |
void | set_name_regex_str (const string &) |
Setter for the regular expression for a family of names of variables the user wants the current specification to designate. If the variable name as returned by variable_suppression::get_name() is not empty, then this property is ignored at evaluation time. This property might be empty, in which case it's ignored at evaluation time. More... | |
void | set_symbol_name (const string &) |
Setter for the name of the symbol of the variable the user wants the current specification to designate. More... | |
void | set_symbol_name_not_regex_str (const string &) |
Setter for a regular expression for a family of names of symbols of variables the user wants this specification to designate. More... | |
void | set_symbol_name_regex_str (const string &) |
Setter of the regular expression for a family of symbol names of the variables this specification is about to designate. More... | |
void | set_symbol_version (const string &) |
Setter for the version of the symbol of the variable the user wants the current specification to designate. This property might be empty, in which case it's ignored at evaluation time. More... | |
void | set_symbol_version_regex_str (const string &) |
Setter of the regular expression for a family of versions of symbol for the variables the user wants the current specification to designate. If symbol_version is not empty, then this property is ignored at evaluation time. This property might be empty, in which case it's ignored at evaluation time. More... | |
void | set_type_name (const string &) |
Setter for the name of the type of the variable the user wants the current specification to designate. More... | |
void | set_type_name_regex_str (const string &) |
Setter for the regular expression for a family of type names of variables the user wants the current specification to designate. More... | |
bool | suppresses_diff (const diff *d) const |
Evaluate this suppression specification on a given diff node and say if the diff node should be suppressed or not. More... | |
bool | suppresses_variable (const var_decl *var, change_kind k, const diff_context_sptr cxt) const |
Evaluate the current variable suppression specification on a given var_decl and say if a report about a change involving this var_decl should be suppressed or not. More... | |
bool | suppresses_variable (const var_decl_sptr var, change_kind k, const diff_context_sptr cxt) const |
Evaluate the current variable suppression specification on a given var_decl and say if a report about a change involving this var_decl should be suppressed or not. More... | |
bool | suppresses_variable_symbol (const elf_symbol *sym, change_kind k, const diff_context_sptr cxt) const |
Evaluate the current variable suppression specification on a given elf_symbol and say if a report about a change involving this elf_symbol should be suppressed or not. More... | |
bool | suppresses_variable_symbol (const elf_symbol_sptr fn, change_kind k, const diff_context_sptr cxt) const |
Evaluate the current variable suppression specification on a given elf_symbol and say if a report about a change involving this elf_symbol should be suppressed or not. More... | |
![]() | |
suppression_base (const string &label) | |
Constructor for suppression_base. More... | |
suppression_base (const string &label, const string &file_name_regex_str, const string &file_name_not_regex_str) | |
Constructor for suppression_base. More... | |
bool | get_drops_artifact_from_ir () const |
Tests if the current suppression specification is to avoid adding the matched ABI artifact to the internal representation or not. More... | |
const string & | get_file_name_not_regex_str () const |
Getter for the "file_name_not_regex" property of the current instance of suppression_base. More... | |
const string & | get_file_name_regex_str () const |
Getter for the "file_name_regex" property of the current instance of suppression_base. More... | |
bool | get_is_artificial () const |
Test is the suppression specification is artificial. More... | |
const string | get_label () const |
Getter for the label associated to this suppression specification. More... | |
const string & | get_soname_not_regex_str () const |
Getter of the "soname_not_regex_str property of the current instance of suppression_base. More... | |
const string & | get_soname_regex_str () const |
Getter of the "soname_regex_str property of the current instance of suppression_base. More... | |
bool | has_file_name_related_property () const |
Test if the current suppression has a property related to file name. More... | |
bool | has_soname_related_property () const |
Test if the current suppression has a property related to SONAMEs. More... | |
void | set_drops_artifact_from_ir (bool) |
Set the flag that says whether the current suppression specification is to avoid adding the matched ABI artifact to the internal representation or not. More... | |
void | set_file_name_not_regex_str (const string ®exp) |
Setter for the "file_name_not_regex" property of the current instance of suppression_base. More... | |
void | set_file_name_regex_str (const string ®exp) |
Setter for the "file_name_regex" property of the current instance of suppression_base. More... | |
void | set_is_artificial (bool) |
Set a flag saying if the suppression specification is artificial or not. More... | |
void | set_label (const string &) |
Setter for the label associated to this suppression specification. More... | |
void | set_soname_not_regex_str (const string ®exp) |
Setter of the "soname_not_regex_str property of the current instance of suppression_base. More... | |
void | set_soname_regex_str (const string ®exp) |
Setter of the "soname_regex_str property of the current instance of suppression_base. More... | |
Static Public Member Functions | |
static change_kind | parse_change_kind (const string &) |
Parses a string containing the content of the "change-kind" property and returns the an instance of variable_suppression::change_kind as a result. More... | |
Public Attributes | |
std::unique_ptr< priv > | priv_ |
![]() | |
std::unique_ptr< priv > | priv_ |
The abstraction of a variable suppression specification.
It specifies under which condition reports about a var_diff diff node should be dropped on the floor for the purpose of reporting.
Definition at line 757 of file abg-suppression.h.
enum change_kind |
The kind of change the current variable suppression should apply to.
Definition at line 763 of file abg-suppression.h.
variable_suppression | ( | const string & | label = "" , |
const string & | name = "" , |
||
const string & | name_regex_str = "" , |
||
const string & | symbol_name = "" , |
||
const string & | symbol_name_regex_str = "" , |
||
const string & | symbol_version = "" , |
||
const string & | symbol_version_regex = "" , |
||
const string & | type_name = "" , |
||
const string & | type_name_regex_str = "" |
||
) |
Constructor for the variable_suppression type.
label | an informative text string that the evalution code might use to designate this variable suppression specification in error messages. This parameter might be empty, in which case it's ignored at evaluation time. |
name | the name of the variable the user wants the current specification to designate. This parameter might be empty, in which case it's ignored at evaluation time. |
name_regex_str | if name is empty, this parameter is a regular expression for a family of names of variables the user wants the current specification to designate. If name is not empty, then this parameter is ignored at evaluation time. This parameter might be empty, in which case it's ignored at evaluation time. |
symbol_name | the name of the symbol of the variable the user wants the current specification to designate. This parameter might be empty, in which case it's ignored at evaluation time. |
symbol_name_str | if symbol_name is empty, this parameter is a regular expression for a family of names of symbols of variables the user wants the current specification to designate. If symbol_name is not empty, then this parameter is ignored at evaluation time. This parameter might be empty, in which case it's ignored at evaluation time. |
symbol_version | the version of the symbol of the variable the user wants the current specification to designate. This parameter might be empty, in which case it's ignored at evaluation time. |
symbol_version_regex | if symbol_version is empty, then this parameter is a regular expression for a family of versions of symbol for the variables the user wants the current specification to designate. If symbol_version is not empty, then this parameter is ignored at evaluation time. This parameter might be empty, in which case it's ignored at evaluation time. |
type_name | the name of the type of the variable the user wants the current specification to designate. This parameter might be empty, in which case it's ignored at evaluation time. |
type_name_regex_str | if type_name is empty, then this parameter is a regular expression for a family of type names of variables the user wants the current specification to designate. If type_name is not empty, then this parameter is ignored at evluation time. This parameter might be empty, in which case it's ignored at evaluation time. |
Definition at line 3849 of file abg-suppression.cc.
|
virtual |
Virtual destructor for the @erf variable_suppression type. variable_suppression type.
Definition at line 3867 of file abg-suppression.cc.
variable_suppression::change_kind get_change_kind | ( | ) | const |
Getter of the "change_king" property.
Definition at line 3896 of file abg-suppression.cc.
const string & get_name | ( | ) | const |
Getter for the name of the variable the user wants the current specification to designate. This property might be empty, in which case it's ignored at evaluation time.
Definition at line 3912 of file abg-suppression.cc.
const string & get_name_not_regex_str | ( | ) | const |
Getter for the "name_not_regexp" property of the specification.
Definition at line 3952 of file abg-suppression.cc.
const string & get_name_regex_str | ( | ) | const |
Getter for the regular expression for a family of names of variables the user wants the current specification to designate. If the variable name as returned by variable_suppression::get_name() is not empty, then this property is ignored at evaluation time. This property might be empty, in which case it's ignored at evaluation time.
Definition at line 3933 of file abg-suppression.cc.
const string & get_symbol_name | ( | ) | const |
Getter for the name of the symbol of the variable the user wants the current specification to designate.
This property might be empty, in which case it is ignored at evaluation time.
Definition at line 3970 of file abg-suppression.cc.
const string & get_symbol_name_not_regex_str | ( | ) | const |
Getter for a regular expression for a family of names of symbols of variables the user wants this specification to designate.
If a symbol name is matched by this regular expression, then the suppression specification will *NOT* suppress the symbol.
If the symbol name as returned by variable_suppression::get_symbol_name() is not empty, then this property is ignored at specification evaluation time.
This property might be empty, in which case it's ignored at evaluation time.
Definition at line 4026 of file abg-suppression.cc.
const string & get_symbol_name_regex_str | ( | ) | const |
Getter of the regular expression for a family of symbol names of the variables this specification is about to designate.
This property might be empty, in which case it's ignored at evaluation time. Otherwise, it is taken in account iff the property returned by variable_suppression::get_symbol_name() is empty.
Definition at line 3994 of file abg-suppression.cc.
const string & get_symbol_version | ( | ) | const |
Getter for the version of the symbol of the variable the user wants the current specification to designate. This property might be empty, in which case it's ignored at evaluation time.
Definition at line 4055 of file abg-suppression.cc.
const string & get_symbol_version_regex_str | ( | ) | const |
Getter of the regular expression for a family of versions of symbol for the variables the user wants the current specification to designate. If symbol_version
is not empty, then this property is ignored at evaluation time. This property might be empty, in which case it's ignored at evaluation time.
Definition at line 4076 of file abg-suppression.cc.
const string & get_type_name | ( | ) | const |
Getter for the name of the type of the variable the user wants the current specification to designate.
This property might be empty, in which case it's ignored at evaluation time.
Definition at line 4099 of file abg-suppression.cc.
const string & get_type_name_regex_str | ( | ) | const |
Getter for the regular expression for a family of type names of variables the user wants the current specification to designate.
If the type name as returned by variable_suppression::get_type_name() is not empty, then this property is ignored at evaluation time. This property might be empty, in which case it's ignored at evaluation time.
Definition at line 4123 of file abg-suppression.cc.
|
static |
Parses a string containing the content of the "change-kind" property and returns the an instance of variable_suppression::change_kind as a result.
s | the string to parse. |
Definition at line 3878 of file abg-suppression.cc.
void set_change_kind | ( | change_kind | k | ) |
Setter of the "change_kind" property.
k | the new value of of the change_kind. |
Definition at line 3903 of file abg-suppression.cc.
void set_name | ( | const string & | n | ) |
Setter for the name of the variable the user wants the current specification to designate. This property might be empty, in which case it's ignored at evaluation time.
n | the new name of the variable to set. |
Definition at line 3921 of file abg-suppression.cc.
void set_name_not_regex_str | ( | const string & | r | ) |
Setter for the "name_not_regexp" property of the specification.
r | the new value of the "name_not_regexp" property. |
Definition at line 3959 of file abg-suppression.cc.
void set_name_regex_str | ( | const string & | r | ) |
Setter for the regular expression for a family of names of variables the user wants the current specification to designate. If the variable name as returned by variable_suppression::get_name() is not empty, then this property is ignored at evaluation time. This property might be empty, in which case it's ignored at evaluation time.
r | the new regular expression for the variable name. |
Definition at line 3945 of file abg-suppression.cc.
void set_symbol_name | ( | const string & | n | ) |
Setter for the name of the symbol of the variable the user wants the current specification to designate.
This property might be empty, in which case it is ignored at evaluation time.
n | the new name of the symbol of the variable. |
Definition at line 3981 of file abg-suppression.cc.
void set_symbol_name_not_regex_str | ( | const string & | r | ) |
Setter for a regular expression for a family of names of symbols of variables the user wants this specification to designate.
If a symbol name is matched by this regular expression, then the suppression specification will *NOT* suppress the symbol.
If the symbol name as returned by variable_suppression::get_symbol_name() is not empty, then this property is ignored at specification evaluation time.
This property might be empty, in which case it's ignored at evaluation time.
the | new regular expression string for a family of names of symbols that is to be *NOT* suppressed by this suppression specification. |
Definition at line 4046 of file abg-suppression.cc.
void set_symbol_name_regex_str | ( | const string & | r | ) |
Setter of the regular expression for a family of symbol names of the variables this specification is about to designate.
This property might be empty, in which case it's ignored at evaluation time. Otherwise, it is taken in account iff the property returned by variable_suppression::get_symbol_name() is empty.
r | the regular expression for a symbol name of the variable. |
Definition at line 4007 of file abg-suppression.cc.
void set_symbol_version | ( | const string & | v | ) |
Setter for the version of the symbol of the variable the user wants the current specification to designate. This property might be empty, in which case it's ignored at evaluation time.
Definition at line 4064 of file abg-suppression.cc.
void set_symbol_version_regex_str | ( | const string & | r | ) |
Setter of the regular expression for a family of versions of symbol for the variables the user wants the current specification to designate. If symbol_version
is not empty, then this property is ignored at evaluation time. This property might be empty, in which case it's ignored at evaluation time.
v | the new regular expression of the symbol version of the variable. |
Definition at line 4088 of file abg-suppression.cc.
void set_type_name | ( | const string & | n | ) |
Setter for the name of the type of the variable the user wants the current specification to designate.
This property might be empty, in which case it's ignored at evaluation time.
n | the new name of the variable type. |
Definition at line 4110 of file abg-suppression.cc.
void set_type_name_regex_str | ( | const string & | r | ) |
Setter for the regular expression for a family of type names of variables the user wants the current specification to designate.
If the type name as returned by variable_suppression::get_type_name() is not empty, then this property is ignored at evaluation time. This property might be empty, in which case it's ignored at evaluation time.
r | the regular expression of the variable type name. |
Definition at line 4136 of file abg-suppression.cc.
|
virtual |
Evaluate this suppression specification on a given diff node and say if the diff node should be suppressed or not.
diff | the diff node to evaluate this suppression specification against. |
diff
should be suppressed. Implements suppression_base.
Definition at line 4147 of file abg-suppression.cc.
bool suppresses_variable | ( | const var_decl * | var, |
change_kind | k, | ||
const diff_context_sptr | ctxt | ||
) | const |
Evaluate the current variable suppression specification on a given var_decl and say if a report about a change involving this var_decl should be suppressed or not.
var | the var_decl to evaluate this suppression specification against. |
k | the kind of variable change var is supposed to have. |
ctxt | the context of the current diff. |
var
should be suppressed. Definition at line 4180 of file abg-suppression.cc.
bool suppresses_variable | ( | const var_decl_sptr | var, |
change_kind | k, | ||
const diff_context_sptr | ctxt | ||
) | const |
Evaluate the current variable suppression specification on a given var_decl and say if a report about a change involving this var_decl should be suppressed or not.
var | the var_decl to evaluate this suppression specification against. |
k | the kind of variable change var is supposed to have. |
ctxt | the context of the current diff. |
var
should be suppressed. Definition at line 4300 of file abg-suppression.cc.
bool suppresses_variable_symbol | ( | const elf_symbol * | sym, |
change_kind | k, | ||
const diff_context_sptr | ctxt | ||
) | const |
Evaluate the current variable suppression specification on a given elf_symbol and say if a report about a change involving this elf_symbol should be suppressed or not.
sym | the elf_symbol to evaluate this suppression specification against. |
k | the kind of variable change sym is supposed to have. |
ctxt | the context of the current diff. |
sym
should be suppressed. Definition at line 4319 of file abg-suppression.cc.
bool suppresses_variable_symbol | ( | const elf_symbol_sptr | sym, |
change_kind | k, | ||
const diff_context_sptr | ctxt | ||
) | const |
Evaluate the current variable suppression specification on a given elf_symbol and say if a report about a change involving this elf_symbol should be suppressed or not.
sym | the elf_symbol to evaluate this suppression specification against. |
k | the kind of variable change sym is supposed to have. |
ctxt | the context of the current diff. |
sym
should be suppressed. Definition at line 4412 of file abg-suppression.cc.