libabigail
Typedefs | Functions
abigail::abixml Namespace Reference

The namespace for the native XML file format reader. More...

Typedefs

typedef shared_ptr< reader > reader_sptr
 

Functions

void add_reader_suppressions (reader &rdr, 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 ELF and DWARF. More...
 
void consider_types_not_reachable_from_public_interfaces (fe_iface &iface, bool flag)
 Configure the reader so that types not reachable from public interface are taken into account when the abixml file is read. More...
 
fe_iface_sptr create_reader (const string &path, environment &env)
 Create an xml_reader::reader to read a native XML ABI file. More...
 
fe_iface_sptr create_reader (std::istream *in, environment &env)
 Create an xml_reader::reader to read a native XML ABI from an input stream.. More...
 
corpus_sptr read_corpus_from_abixml (std::istream *in, environment &env)
 De-serialize an ABI corpus from an input XML document which root node is 'abi-corpus'. More...
 
corpus_sptr read_corpus_from_abixml_file (const string &path, environment &env)
 De-serialize an ABI corpus from an XML document file which root node is 'abi-corpus'. More...
 
corpus_group_sptr read_corpus_group_from_abixml (std::istream *in, environment &env)
 De-serialize an ABI corpus group from an input XML document which root node is 'abi-corpus-group'. More...
 
corpus_group_sptr read_corpus_group_from_abixml_file (const string &path, environment &env)
 De-serialize an ABI corpus group from an XML document file which root node is 'abi-corpus-group'. More...
 
corpus_group_sptr read_corpus_group_from_input (fe_iface &iface)
 Parse the input XML document containing an ABI corpus group, represented by an 'abi-corpus-group' element node, associated to the current context. More...
 
translation_unit_sptr read_translation_unit (fe_iface &iface)
 Parse a translation unit from an abixml input from a given context. More...
 
translation_unit_sptr read_translation_unit_from_buffer (const std::string &file_path, environment &env)
 
translation_unit_sptr read_translation_unit_from_buffer (const string &buffer, environment &env)
 Parse an ABI instrumentation file (in XML format) from an in-memory buffer. More...
 
translation_unit_sptr read_translation_unit_from_file (const std::string &file_path, environment &env)
 
translation_unit_sptr read_translation_unit_from_file (const string &input_file, environment &env)
 Parse an ABI instrumentation file (in XML format) at a given path. More...
 
translation_unit_sptr read_translation_unit_from_istream (istream *in, environment &env)
 De-serialize a translation unit from an ABI Instrumentation xml file coming from an input stream. More...
 
translation_unit_sptr read_translation_unit_from_istream (std::istream *in, environment &env)
 

Detailed Description

The namespace for the native XML file format reader.

Function Documentation

◆ add_reader_suppressions()

void abigail::abixml::add_reader_suppressions ( reader &  rdr,
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 ELF and DWARF.

During the construction of the ABI corpus, ABI artifacts that match the 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 specifications 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.

Parameters
rdrthe context that is going to be used by functions that read types and declarations information to construct and ABI corpus.
supprsthe suppression specifications to be applied during the construction of the ABI corpus.

Definition at line 2084 of file abg-reader.cc.

◆ consider_types_not_reachable_from_public_interfaces()

void consider_types_not_reachable_from_public_interfaces ( fe_iface iface,
bool  flag 
)

Configure the reader so that types not reachable from public interface are taken into account when the abixml file is read.

Parameters
rdrthe @reader to consider.
flagif yes, then types not reachable from public interface are taken into account when the abixml file is read.

Definition at line 2103 of file abg-reader.cc.

◆ create_reader() [1/2]

abigail::fe_iface_sptr create_reader ( const string &  path,
environment env 
)

Create an xml_reader::reader to read a native XML ABI file.

Parameters
paththe path to the native XML file to read.
envthe environment to use.
Returns
the created context.

Definition at line 6324 of file abg-reader.cc.

◆ create_reader() [2/2]

fe_iface_sptr create_reader ( std::istream *  in,
environment env 
)

Create an xml_reader::reader to read a native XML ABI from an input stream..

Parameters
inthe input stream that contains the native XML file to read.
envthe environment to use.
Returns
the created context.

Definition at line 6347 of file abg-reader.cc.

◆ read_corpus_from_abixml()

corpus_sptr read_corpus_from_abixml ( std::istream *  in,
environment env 
)

De-serialize an ABI corpus from an input XML document which root node is 'abi-corpus'.

Parameters
inthe input stream to read the XML document from.
envthe environment to use. Note that the life time of this environment must be greater than the lifetime of the resulting corpus as the corpus uses resources that are allocated in the environment.
Returns
the resulting corpus de-serialized from the parsing. This is non-null iff the parsing resulted in a valid corpus.

Definition at line 6373 of file abg-reader.cc.

◆ read_corpus_from_abixml_file()

corpus_sptr read_corpus_from_abixml_file ( const string &  path,
environment env 
)

De-serialize an ABI corpus from an XML document file which root node is 'abi-corpus'.

Parameters
paththe path to the input file to read the XML document from.
envthe environment to use. Note that the life time of this environment must be greater than the lifetime of the resulting corpus as the corpus uses resources that are allocated in the environment.
Returns
the resulting corpus de-serialized from the parsing. This is non-null if the parsing successfully resulted in a corpus.

Definition at line 6395 of file abg-reader.cc.

◆ read_corpus_group_from_abixml()

corpus_group_sptr read_corpus_group_from_abixml ( std::istream *  in,
environment env 
)

De-serialize an ABI corpus group from an input XML document which root node is 'abi-corpus-group'.

Parameters
inthe input stream to read the XML document from.
envthe environment to use. Note that the life time of this environment must be greater than the lifetime of the resulting corpus as the corpus uses resources that are allocated in the environment.
Returns
the resulting corpus group de-serialized from the parsing. This is non-null iff the parsing resulted in a valid corpus group.

Definition at line 2248 of file abg-reader.cc.

◆ read_corpus_group_from_abixml_file()

corpus_group_sptr read_corpus_group_from_abixml_file ( const string &  path,
environment env 
)

De-serialize an ABI corpus group from an XML document file which root node is 'abi-corpus-group'.

Parameters
paththe path to the input file to read the XML document from.
envthe environment to use. Note that the life time of this environment must be greater than the lifetime of the resulting corpus as the corpus uses resources that are allocated in the environment.
Returns
the resulting corpus group de-serialized from the parsing. This is non-null if the parsing successfully resulted in a corpus group.

Definition at line 2270 of file abg-reader.cc.

◆ read_corpus_group_from_input()

corpus_group_sptr read_corpus_group_from_input ( fe_iface iface)

Parse the input XML document containing an ABI corpus group, represented by an 'abi-corpus-group' element node, associated to the current context.

Parameters
rdrthe current input context.
Returns
the corpus group resulting from the parsing

Definition at line 2183 of file abg-reader.cc.

◆ read_translation_unit()

translation_unit_sptr read_translation_unit ( fe_iface iface)

Parse a translation unit from an abixml input from a given context.

Parameters
rdrthe reader to consider.
Returns
the constructed translation_unit from the content of the input abixml.

Definition at line 2329 of file abg-reader.cc.

◆ read_translation_unit_from_buffer()

translation_unit_sptr abigail::abixml::read_translation_unit_from_buffer ( const string &  buffer,
environment env 
)

Parse an ABI instrumentation file (in XML format) from an in-memory buffer.

Parameters
bufferthe in-memory buffer containing the xml document to parse.
envthe environment to use.
Returns
the translation unit resulting from the parsing upon successful completion, or nil.

Definition at line 2310 of file abg-reader.cc.

◆ read_translation_unit_from_file()

translation_unit_sptr abigail::abixml::read_translation_unit_from_file ( const string &  input_file,
environment env 
)

Parse an ABI instrumentation file (in XML format) at a given path.

Parameters
input_filea path to the file containing the xml document to parse.
envthe environment to use.
Returns
the translation unit resulting from the parsing upon successful completion, or nil.

Definition at line 2288 of file abg-reader.cc.

◆ read_translation_unit_from_istream()

translation_unit_sptr abigail::abixml::read_translation_unit_from_istream ( istream *  in,
environment env 
)

De-serialize a translation unit from an ABI Instrumentation xml file coming from an input stream.

Parameters
ina pointer to the input stream.
envthe environment to use.
Returns
the translation unit resulting from the parsing upon successful completion, or nil.

Definition at line 6300 of file abg-reader.cc.