libabigail
Loading...
Searching...
No Matches
abigail::abixml Namespace Reference

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

Typedefs

typedef shared_ptr< reader > reader_sptr
 
typedef unordered_map< string, vector< string > > string_strings_map_type
 Convenience typedef for an unordered map of string to a vector of strings.
 

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.
 
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.
 
fe_iface_sptr create_reader (const string &path, environment &env)
 Create an xml_reader::reader to read a native XML ABI file.
 
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..
 
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'.
 
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'.
 
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'.
 
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'.
 
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.
 
translation_unit_sptr read_translation_unit (fe_iface &iface)
 Parse a translation unit from an abixml input from a given context.
 
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.
 
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.
 
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.
 
translation_unit_sptr read_translation_unit_from_istream (std::istream *in, environment &env)
 

Detailed Description

The namespace for the native XML file format reader.

Typedef Documentation

◆ reader_sptr

typedef shared_ptr<reader> reader_sptr

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

◆ string_strings_map_type

typedef unordered_map<string, vector<string> > string_strings_map_type

Convenience typedef for an unordered map of string to a vector of strings.

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

Function Documentation

◆ add_reader_suppressions()

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.

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 2275 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 2294 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 6970 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 6993 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 7019 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 7041 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 2464 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 2486 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 2374 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 2545 of file abg-reader.cc.

◆ read_translation_unit_from_buffer()

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.

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 2526 of file abg-reader.cc.

◆ read_translation_unit_from_file()

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.

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 2504 of file abg-reader.cc.

◆ read_translation_unit_from_istream()

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.

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 6946 of file abg-reader.cc.