12 #include "abg-internal.h"
14 ABG_BEGIN_EXPORT_DECLARATIONS
35 priv(
const std::string& path, environment& e)
36 : corpus_path(path), options(e)
69 : priv_(new priv(corpus_path, e))
93 {
return priv_->options;}
100 {
return priv_->options;}
109 {
return priv_->corpus_path;}
118 {priv_->corpus_path = p;}
125 {
return priv_->dt_soname;}
132 {priv_->dt_soname = soname;}
141 {
return priv_->options.load_in_linux_kernel_mode;}
150 {
return priv_->suppressions;}
159 {
return priv_->suppressions;}
168 {priv_->suppressions = supprs;}
194 for (
const auto& s : supprs)
195 if (s->get_drops_artifact_from_ir())
207 priv_->corpus = std::make_shared<ir::corpus>(
options().env,
210 return priv_->corpus;
225 {
return priv_->corpus_group;}
230 const corpus_group_sptr&
241 {priv_->corpus_group = cg;}
259 return corpus_sptr();
272 if (main_corpus.get() ==
corpus().get())
297 return corpus_sptr();
317 corpus()->get_exported_decls_builder().
get())
318 added = b->maybe_add_fn_to_exported_fns(const_cast<function_decl*>(fn));
323 corpus()->get_undefined_functions().insert(fn);
343 corpus()->get_exported_decls_builder().
get())
344 added = b->maybe_add_var_to_exported_vars(var);
349 corpus()->get_undefined_variables().insert(var);
364 | static_cast<unsigned>(r));
378 & static_cast<unsigned>(r));
424 str +=
"could not find debug info";
427 str +=
"could not find alternate debug info";
430 str +=
"could not load ELF symbols";
suppr::suppressions_type & suppressions()
Getter of the vector of suppression specifications associated with the current front-end.
This file contains the declarations for the fe_iface a.k.a "Front End Interface". ...
The base class of all libabigail front-ends: The Front End Interface.
fe_iface::status & operator|=(fe_iface::status &l, fe_iface::status r)
The bitwise |= operator for the fe_iface::status type.
const options_type & options() const
Getter of the the options of the current Front End Interface.
options_type(environment &)
Constructor of the type fe_iface::options_type.
const elf_symbol_sptr & get_symbol() const
Gets the the underlying ELF symbol for the current variable, that was set using function_decl::set_sy...
The generic options that control the behaviour of all Front-End interfaces.
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.
status
The status of the fe_iface::read_corpus call.
const elf_symbol_sptr & get_symbol() const
Gets the the underlying ELF symbol for the current variable, that was set using var_decl::set_symbol(...
fe_iface::status & operator&=(fe_iface::status &l, fe_iface::status r)
The bitwise &= operator for the fe_iface::status type.
Abstracts a variable declaration.
bool has_corpus_group() const
Test if there is a corpus group being built.
This status is for when the debug info could not be read.
corpus_group_sptr & corpus_group()
Getter for the ABI corpus group being built by the current front-end.
void add_var_to_exported_or_undefined_decls(const var_decl *var)
Add the representation of the ABI of a variable to the set of exported or undefined declarations of t...
Toplevel namespace for libabigail.
std::string status_to_diagnostic_string(fe_iface::status s)
Return a diagnostic status with english sentences to describe the problems encoded in a given abigail...
Abstraction for a function declaration.
This is an abstraction of the set of resources necessary to manage several aspects of the internal re...
corpus_sptr main_corpus_from_current_group()
Return the main corpus from the current corpus group, if any.
corpus_sptr corpus()
Getter for the ABI corpus being built by the current front-end.
fe_iface(const std::string &corpus_path, environment &e)
Constructor of the type fe_iface.
void add_fn_to_exported_or_undefined_decls(const function_decl *fn)
Add the representation of the ABI of a function to the set of exported declarations or undefined decl...
vector< suppression_sptr > suppressions_type
Convenience typedef for a vector of suppression_sptr.
Abstracts the building of the set of exported variables and functions.
This status is for when the symbols of the ELF binaries could not be read.
fe_iface::status operator|(fe_iface::status l, fe_iface::status r)
The bitwise OR operator for the fe_iface::status type.
const std::string & corpus_path() const
Getter of the path to the file which an ABI corpus is to be created for.
fe_iface::status operator&(fe_iface::status l, fe_iface::status r)
The bitwise AND operator for the fe_iface::status type.
const string & dt_soname() const
Getter for the SONAME of the analyzed binary.
bool load_in_linux_kernel_mode() const
Test if the input binary is to be considered as a Linux Kernel binary.
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 corp...
virtual ~fe_iface()
Desctructor of the Front End Interface.
virtual void initialize(const std::string &corpus_path)
Re-initialize the current Front End.
void add_suppressions(const suppr::suppressions_type &)
Add suppressions specifications to the set of suppressions to be used during the construction of the ...
This status is for when the alternate debug info could not be found.