12#include "abg-internal.h"
14ABG_BEGIN_EXPORT_DECLARATIONS
19ABG_END_EXPORT_DECLARATIONS
35 priv(
const std::string& path, environment& e)
92{
return priv_->options;}
99{
return priv_->options;}
108{
return priv_->corpus_path;}
117{priv_->corpus_path = p;}
124{
return priv_->dt_soname;}
131{priv_->dt_soname = soname;}
140{
return priv_->options.load_in_linux_kernel_mode;}
149{
return priv_->suppressions;}
158{
return priv_->suppressions;}
167{priv_->suppressions = supprs;}
193 for (
const auto& s : supprs)
194 if (s->get_drops_artifact_from_ir())
206 priv_->corpus = std::make_shared<ir::corpus>(
options().env,
209 return priv_->corpus;
224{
return priv_->corpus_group;}
229const corpus_group_sptr&
240{priv_->corpus_group = cg;}
258 return corpus_sptr();
271 if (main_corpus.get() ==
corpus().get())
296 return corpus_sptr();
316 corpus()->get_exported_decls_builder().get())
317 added = b->maybe_add_fn_to_exported_fns(
const_cast<function_decl*
>(fn));
322 corpus()->get_undefined_functions().insert(fn);
342 corpus()->get_exported_decls_builder().get())
343 added = b->maybe_add_var_to_exported_vars(var);
347 if (!var->get_symbol() || !var->get_symbol()->is_defined())
348 corpus()->get_undefined_variables().insert(var);
363 |
static_cast<unsigned>(r));
377 &
static_cast<unsigned>(r));
423 str +=
"could not find debug info";
426 str +=
"could not find alternate debug info";
429 str +=
"could not load ELF symbols";
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.
bool has_corpus_group() const
Test if there is a corpus group being built.
status
The status of the fe_iface::read_corpus call.
@ STATUS_NO_SYMBOLS_FOUND
This status is for when the symbols of the ELF binaries could not be read.
@ STATUS_DEBUG_INFO_NOT_FOUND
This status is for when the debug info could not be read.
@ STATUS_ALT_DEBUG_INFO_NOT_FOUND
This status is for when the alternate debug info could not be found.
const options_type & options() const
Getter of the the options of the current Front End Interface.
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...
corpus_sptr corpus()
Getter for the ABI corpus being built by the current front-end.
suppr::suppressions_type & suppressions()
Getter of the vector of suppression specifications associated with the current front-end.
corpus_group_sptr & corpus_group()
Getter for the ABI corpus group being built by the current front-end.
fe_iface(const std::string &corpus_path, environment &e)
Constructor of the type fe_iface.
virtual void initialize(const std::string &corpus_path)
Re-initialize the current Front End.
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...
bool load_in_linux_kernel_mode() const
Test if the input binary is to be considered as a Linux Kernel binary.
void add_var_to_exported_or_undefined_decls(const var_decl_sptr &var)
Add the representation of the ABI of a variable to the set of exported or undefined declarations of t...
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.
virtual ~fe_iface()
Desctructor of the Front End Interface.
const std::string & corpus_path() const
Getter of the path to the file which an ABI corpus is to be created for.
const string & dt_soname() const
Getter for the SONAME of the analyzed binary.
corpus_sptr main_corpus_from_current_group()
Return the main corpus from the current corpus group, if any.
void add_suppressions(const suppr::suppressions_type &)
Add suppressions specifications to the set of suppressions to be used during the construction of the ...
Abstracts the building of the set of exported variables and functions.
This is the abstraction of a set of translation units (themselves seen as bundles of unitary abi arte...
This is an abstraction of the set of resources necessary to manage several aspects of the internal re...
Abstraction for a function declaration.
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...
shared_ptr< var_decl > var_decl_sptr
Convenience typedef for a shared pointer on a var_decl.
vector< suppression_sptr > suppressions_type
Convenience typedef for a vector of suppression_sptr.
Toplevel namespace for libabigail.
fe_iface::status & operator|=(fe_iface::status &l, fe_iface::status r)
The bitwise |= operator for the fe_iface::status type.
fe_iface::status & operator&=(fe_iface::status &l, fe_iface::status r)
The bitwise &= operator for the fe_iface::status type.
fe_iface::status operator&(fe_iface::status l, fe_iface::status r)
The bitwise AND operator for the fe_iface::status type.
fe_iface::status operator|(fe_iface::status l, fe_iface::status r)
The bitwise OR operator for the fe_iface::status type.
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...
The generic options that control the behaviour of all Front-End interfaces.
options_type(environment &)
Constructor of the type fe_iface::options_type.