GTIRB  v2.2.0
GrammaTech Intermediate Representation for Binaries: C++ API
Classes | Public Member Functions | Static Public Member Functions | Friends | List of all members
gtirb::Module Class Reference

Represents a single binary (library or executable). More...

#include <Module.hpp>

Inheritance diagram for gtirb::Module:
Inheritance graph
[legend]
Collaboration diagram for gtirb::Module:
Collaboration graph
[legend]

Public Member Functions

const std::string & getBinaryPath () const
 Get the location of the corresponding binary on disk. More...
 
gtirb::ByteOrder getByteOrder () const
 Get the endianness of the instructions in this Module. More...
 
CodeBlockgetEntryPoint ()
 Get the entry point of this module, or null if not present. More...
 
const CodeBlockgetEntryPoint () const
 Get the entry point of this module, or null if not present. More...
 
gtirb::FileFormat getFileFormat () const
 Get the format of the binary pointed to by getBinaryPath(). More...
 
IRgetIR ()
 Get the IR this module belongs to. More...
 
const IRgetIR () const
 Get the IR this module belongs to. More...
 
gtirb::ISA getISA () const
 Get the ISA of the instructions in this Module. More...
 
const std::string & getName () const
 Get the module name. More...
 
gtirb::Addr getPreferredAddr () const
 Get the preferred address for loading this module. More...
 
int64_t getRebaseDelta () const
 Get the difference between this module's preferred address and the address where it was actually loaded. More...
 
bool isRelocated () const
 Has the image been loaded somewhere other than its preferred address? More...
 
void setBinaryPath (const std::string &X)
 Set the location of the corresponding binary on disk. More...
 
void setByteOrder (gtirb::ByteOrder X)
 Set the endianness of the instructions in this Module. More...
 
void setEntryPoint (CodeBlock *CB)
 Set the entry point of this module. More...
 
void setFileFormat (gtirb::FileFormat X)
 Set the format of the binary pointed to by getBinaryPath(). More...
 
void setISA (gtirb::ISA X)
 Set the ISA of the instructions in this Module. More...
 
void setName (const std::string &X)
 Set the module name. More...
 
void setPreferredAddr (gtirb::Addr X)
 Set the preferred address for loading this module. More...
 
void setRebaseDelta (int64_t X)
 Set the difference between this module's preferred address and the address where it was actually loaded. More...
 
- Public Member Functions inherited from gtirb::AuxDataContainer
template<typename Schema >
void addAuxData (typename Schema::Type &&X)
 Add a new AuxData, transferring ownership. More...
 
template<typename Schema >
Schema::Type * getAuxData ()
 Get a reference to the underlying type stored in the AuxData by name. More...
 
template<typename Schema >
const Schema::Type * getAuxData () const
 Get a reference to the underlying type stored in the AuxData by name. More...
 
template<typename Schema >
bool removeAuxData ()
 Remove an AuxData by schema. More...
 
bool removeAuxData (std::string Name)
 Remove an AuxData by name. More...
 
const_aux_data_iterator aux_data_begin () const
 Return a constant iterator to the first AuxData. More...
 
const_aux_data_iterator aux_data_end () const
 Return a constant iterator to the element following the last AuxData. More...
 
const_aux_data_range aux_data () const
 Return a constant range of the auxiliary data (AuxData). More...
 
size_t getAuxDataSize () const
 Get the total number of AuxData objects in this IR. More...
 
bool getAuxDataEmpty () const
 Check: Is the number of AuxData objects in this IR zero? More...
 
void clearAuxData ()
 Clear all AuxData from the IR. More...
 
- Public Member Functions inherited from gtirb::Node
 Node (const Node &)=delete
 Copying Nodes is explicitly disabled. More...
 
 Node (Node &&)=delete
 Move-constructing Nodes is explicitly disabled. More...
 
 ~Node () noexcept
 Cleans up resources no longer needed by the Node object. More...
 
const UUIDgetUUID () const
 Get the Universally Unique ID (UUID) for this. More...
 
Nodeoperator= (const Node &)=delete
 Copying Nodes is explicilty disabled. More...
 
Nodeoperator= (Node &&)=delete
 Move-assigning Nodes is explicilty disabled. More...
 

Static Public Member Functions

static ModuleCreate (Context &C, const std::string &Name)
 Create a Module object. More...
 
- Static Public Member Functions inherited from gtirb::AuxDataContainer
template<typename Schema >
static void registerAuxDataType ()
 Register a type to be used with AuxData of the given name. More...
 
- Static Public Member Functions inherited from gtirb::Node
static NodeCreate (Context &C)
 Create a Node object in its default state. More...
 
static const NodegetByUUID (const Context &C, const UUID &Uuid)
 Retrieve a node by its UUID. More...
 
static NodegetByUUID (Context &C, const UUID &Uuid)
 Retrieve a node by its UUID. More...
 

Friends

class Context
 
class IR
 
class SerializationTestHarness
 
template<typename T >
T::MessageType toProtobuf (const T &)
 

ProxyBlock-Related Public Types and Functions

using proxy_block_iterator = boost::indirect_iterator< ProxyBlockSet::iterator >
 Iterator over proxy_blocks (ProxyBlock). More...
 
using proxy_block_range = boost::iterator_range< proxy_block_iterator >
 Range of proxy_blocks (ProxyBlock). More...
 
using const_proxy_block_iterator = boost::indirect_iterator< ProxyBlockSet::const_iterator, const ProxyBlock >
 Constant iterator over proxy_blocks (ProxyBlock). More...
 
using const_proxy_block_range = boost::iterator_range< const_proxy_block_iterator >
 Constant range of proxy_blocks (ProxyBlock). More...
 
proxy_block_iterator proxy_blocks_begin ()
 Return an iterator to the first ProxyBlock. More...
 
const_proxy_block_iterator proxy_blocks_begin () const
 Return a constant iterator to the first ProxyBlock. More...
 
proxy_block_iterator proxy_blocks_end ()
 Return an iterator to the element following the last ProxyBlock. More...
 
const_proxy_block_iterator proxy_blocks_end () const
 Return a constant iterator to the element following the last ProxyBlock. More...
 
proxy_block_range proxy_blocks ()
 Return a range of the proxy_blocks (ProxyBlock). More...
 
const_proxy_block_range proxy_blocks () const
 Return a constant range of the proxy_blocks (ProxyBlock). More...
 
ChangeStatus removeProxyBlock (ProxyBlock *B)
 Remove a ProxyBlock object located in this module. More...
 
ChangeStatus addProxyBlock (ProxyBlock *PB)
 Adds a new ProxyBlock in this module. More...
 
template<typename... Args>
ProxyBlockaddProxyBlock (Context &C, Args &&... A)
 Creates a new ProxyBlock in this module. More...
 

Symbol-Related Public Types and Functions

using symbol_iterator = boost::indirect_iterator< SymbolSet::index< by_pointer >::type::iterator >
 Iterator over symbols (Symbol). More...
 
using symbol_range = boost::iterator_range< symbol_iterator >
 Range of symbols (Symbol). More...
 
using const_symbol_iterator = boost::indirect_iterator< SymbolSet::index< by_pointer >::type::const_iterator, const Symbol >
 Constant iterator over symbols (Symbol). More...
 
using const_symbol_range = boost::iterator_range< const_symbol_iterator >
 Constant range of symbols (Symbol). More...
 
using symbol_name_iterator = boost::indirect_iterator< SymbolSet::index< by_name >::type::iterator >
 Iterator over symbols (Symbol). More...
 
using symbol_name_range = boost::iterator_range< symbol_name_iterator >
 Range of symbols (Symbol). More...
 
using const_symbol_name_iterator = boost::indirect_iterator< SymbolSet::index< by_name >::type::const_iterator, const Symbol >
 Constant iterator over symbols (Symbol). More...
 
using const_symbol_name_range = boost::iterator_range< const_symbol_name_iterator >
 Constant range of symbols (Symbol). More...
 
using symbol_addr_iterator = boost::indirect_iterator< SymbolSet::index< by_address >::type::iterator >
 Iterator over symbols (Symbol). More...
 
using symbol_addr_range = boost::iterator_range< symbol_addr_iterator >
 Range of symbols (Symbol). More...
 
using const_symbol_addr_iterator = boost::indirect_iterator< SymbolSet::index< by_address >::type::const_iterator, const Symbol >
 Constant iterator over symbols (Symbol). More...
 
using const_symbol_addr_range = boost::iterator_range< const_symbol_addr_iterator >
 Constant range of symbols (Symbol). More...
 
using symbol_ref_iterator = boost::indirect_iterator< SymbolSet::index< by_referent >::type::iterator >
 Iterator over symbols (Symbol). More...
 
using symbol_ref_range = boost::iterator_range< symbol_ref_iterator >
 Range of symbols (Symbol). More...
 
using const_symbol_ref_iterator = boost::indirect_iterator< SymbolSet::index< by_referent >::type::const_iterator, const Symbol >
 Constant iterator over symbols (Symbol). More...
 
using const_symbol_ref_range = boost::iterator_range< const_symbol_ref_iterator >
 Constant range of symbols (Symbol). More...
 
symbol_iterator symbols_begin ()
 Return an iterator to the first Symbol. More...
 
const_symbol_iterator symbols_begin () const
 Return a constant iterator to the first Symbol. More...
 
symbol_iterator symbols_end ()
 Return an iterator to the element following the last Symbol. More...
 
const_symbol_iterator symbols_end () const
 Return a constant iterator to the element following the last Symbol. More...
 
symbol_range symbols ()
 Return a range of the symbols (Symbol). More...
 
const_symbol_range symbols () const
 Return a constant range of the symbols (Symbol). More...
 
symbol_name_iterator symbols_by_name_begin ()
 Return an iterator to the first Symbol, ordered by name. More...
 
const_symbol_name_iterator symbols_by_name_begin () const
 Return a constant iterator to the first Symbol, ordered by name. More...
 
symbol_name_iterator symbols_by_name_end ()
 Return an iterator to the element following the last Symbol, ordered by name. More...
 
const_symbol_name_iterator symbols_by_name_end () const
 Return a constant iterator to the element following the last Symbol, ordered by name. More...
 
symbol_name_range symbols_by_name ()
 Return a range of the symbols (Symbol), ordered by name. More...
 
const_symbol_name_range symbols_by_name () const
 Return a constant range of the symbols (Symbol), ordered by name. More...
 
symbol_addr_iterator symbols_by_addr_begin ()
 Return an iterator to the first Symbol, ordered by address. More...
 
const_symbol_addr_iterator symbols_by_addr_begin () const
 Return a constant iterator to the first Symbol, ordered by address. More...
 
symbol_addr_iterator symbols_by_addr_end ()
 Return an iterator to the element following the last Symbol, ordered by address. More...
 
const_symbol_addr_iterator symbols_by_addr_end () const
 Return a constant iterator to the element following the last Symbol, ordered by address. More...
 
symbol_addr_range symbols_by_addr ()
 Return a range of the symbols (Symbol), ordered by address. More...
 
const_symbol_addr_range symbols_by_addr () const
 Return a constant range of the symbols (Symbol), ordered by address. More...
 
bool removeSymbol (Symbol *S)
 Remove a Symbol object located in this module. More...
 
SymboladdSymbol (Symbol *S)
 Move a Symbol object to be located in this module. More...
 
template<typename... Args>
SymboladdSymbol (Context &C, Args... A)
 Creates a new Symbol in this module. More...
 
symbol_name_range findSymbols (const std::string &N)
 Find symbols by name. More...
 
const_symbol_name_range findSymbols (const std::string &N) const
 Find symbols by name. More...
 
symbol_addr_range findSymbols (Addr X)
 Find symbols by address. More...
 
const_symbol_addr_range findSymbols (Addr X) const
 Find symbols by address. More...
 
symbol_addr_range findSymbols (Addr Lower, Addr Upper)
 Find symbols by a range of addresses. More...
 
const_symbol_addr_range findSymbols (Addr Lower, Addr Upper) const
 Find symbols by a range of addresses. More...
 
symbol_ref_range findSymbols (const Node &Referent)
 Find symbols by their referent object. More...
 
const_symbol_ref_range findSymbols (const Node &Referent) const
 Find symbols by their referent object. More...
 

Section-Related Public Types and Functions

using section_iterator = boost::indirect_iterator< SectionSet::iterator >
 Iterator over sections (Section). More...
 
using section_range = boost::iterator_range< section_iterator >
 Range of sections (Section). More...
 
using section_subrange = boost::iterator_range< boost::indirect_iterator< SectionIntMap::codomain_type::iterator > >
 Sub-range of sections overlapping an address (Section). More...
 
using section_name_iterator = boost::indirect_iterator< SectionSet::index< by_name >::type::iterator >
 Iterator over sections (Section). More...
 
using section_name_range = boost::iterator_range< section_name_iterator >
 Range of sections (Section). More...
 
using const_section_iterator = boost::indirect_iterator< SectionSet::const_iterator, const Section & >
 Constant iterator over sections (Section). More...
 
using const_section_range = boost::iterator_range< const_section_iterator >
 Constant range of sections (Section). More...
 
using const_section_subrange = boost::iterator_range< boost::indirect_iterator< SectionIntMap::codomain_type::const_iterator, const Section & > >
 Sub-range of sections overlapping an address (Section). More...
 
using const_section_name_iterator = boost::indirect_iterator< SectionSet::index< by_name >::type::const_iterator, const Section & >
 Constant iterator over sections (Section). More...
 
using const_section_name_range = boost::iterator_range< const_section_name_iterator >
 Constant range of sections (Section). More...
 
section_iterator sections_begin ()
 Return an iterator to the first Section. More...
 
const_section_iterator sections_begin () const
 Return a constant iterator to the first Section. More...
 
section_name_iterator sections_by_name_begin ()
 Return an iterator to the first Section. More...
 
const_section_name_iterator sections_by_name_begin () const
 Return a constant iterator to the first Section. More...
 
section_iterator sections_end ()
 Return an iterator to the element following the last Section. More...
 
const_section_iterator sections_end () const
 Return a constant iterator to the element following the last Section. More...
 
section_name_iterator sections_by_name_end ()
 Return an iterator to the element following the last Section. More...
 
const_section_name_iterator sections_by_name_end () const
 Return a constant iterator to the element following the last Section. More...
 
section_range sections ()
 Return a range of the sections (Section). More...
 
const_section_range sections () const
 Return a constant range of the sections (Section). More...
 
ChangeStatus removeSection (Section *S)
 Remove a Section object located in this module. More...
 
ChangeStatus addSection (Section *S)
 Move a Section object to be located in this module. More...
 
template<typename... Args>
SectionaddSection (Context &C, Args &&... A)
 Creates a new Section in this module. More...
 
section_subrange findSectionsOn (Addr X)
 Find a Section containing an address. More...
 
const_section_subrange findSectionsOn (Addr X) const
 Find a Section containing an address. More...
 
section_range findSectionsAt (Addr A)
 Find all the sections that start at an address. More...
 
section_range findSectionsAt (Addr Low, Addr High)
 Find all the sections that start between a range of addresses. More...
 
const_section_range findSectionsAt (Addr A) const
 Find all the sections that start at an address. More...
 
const_section_range findSectionsAt (Addr Low, Addr High) const
 Find all the sections that start between a range of addresses. More...
 
section_name_range findSections (const std::string &X)
 Find a Section by name. More...
 
const_section_name_range findSections (const std::string &X) const
 Find a Section by name. More...
 

ByteInterval-Related Public Types and Functions

using byte_interval_iterator = MergeSortedIterator< Section::byte_interval_iterator, AddressLess >
 Iterator over ByteInterval objects. More...
 
using byte_interval_range = boost::iterator_range< byte_interval_iterator >
 Range of ByteInterval objects. More...
 
using byte_interval_subrange = boost::iterator_range< MergeSortedIterator< Section::byte_interval_subrange::iterator, AddressLess > >
 Sub-range of ByteInterval objects overlapping addresses. More...
 
using const_byte_interval_iterator = MergeSortedIterator< Section::const_byte_interval_iterator, AddressLess >
 Const iterator over ByteInterval objects. More...
 
using const_byte_interval_range = boost::iterator_range< const_byte_interval_iterator >
 Const range of ByteInterval objects. More...
 
using const_byte_interval_subrange = boost::iterator_range< MergeSortedIterator< Section::const_byte_interval_subrange::iterator, AddressLess > >
 Sub-range of ByteInterval objects overlapping addresses. More...
 
byte_interval_iterator byte_intervals_begin ()
 Return an iterator to the first ByteInterval. More...
 
byte_interval_iterator byte_intervals_end ()
 Return an iterator to the element following the last ByteInterval. More...
 
byte_interval_range byte_intervals ()
 Return a range of all the ByteInterval objects. More...
 
const_byte_interval_iterator byte_intervals_begin () const
 Return an iterator to the first ByteInterval. More...
 
const_byte_interval_iterator byte_intervals_end () const
 Return an iterator to the element following the last ByteInterval. More...
 
const_byte_interval_range byte_intervals () const
 Return a range of all the ByteInterval objects. More...
 
byte_interval_subrange findByteIntervalsOn (Addr A)
 Find all the intervals that contain the address specified. More...
 
const_byte_interval_subrange findByteIntervalsOn (Addr A) const
 Find all the intervals that contain the address specified. More...
 
byte_interval_range findByteIntervalsAt (Addr A)
 Find all the intervals that start at an address. More...
 
byte_interval_range findByteIntervalsAt (Addr Low, Addr High)
 Find all the intervals that start between a range of addresses. More...
 
const_byte_interval_range findByteIntervalsAt (Addr A) const
 Find all the intervals that start at an address. More...
 
const_byte_interval_range findByteIntervalsAt (Addr Low, Addr High) const
 Find all the intervals that start between a range of addresses. More...
 

Block-Related Public Types and Functions

using block_iterator = MergeSortedIterator< Section::block_iterator, BlockAddressLess >
 Iterator over blocks. More...
 
using block_range = boost::iterator_range< block_iterator >
 Range of blocks. More...
 
using block_subrange = boost::iterator_range< MergeSortedIterator< Section::block_subrange::iterator, BlockAddressLess > >
 Sub-range of blocks overlapping an address or range of addreses. More...
 
using const_block_iterator = MergeSortedIterator< Section::const_block_iterator, BlockAddressLess >
 Iterator over blocks. More...
 
using const_block_range = boost::iterator_range< const_block_iterator >
 Range of blocks. More...
 
using const_block_subrange = boost::iterator_range< MergeSortedIterator< Section::const_block_subrange::iterator, BlockAddressLess > >
 Sub-range of blocks overlapping an address or range of addreses. More...
 
block_iterator blocks_begin ()
 Return an iterator to the first block. More...
 
block_iterator blocks_end ()
 Return an iterator to the element following the last block. More...
 
block_range blocks ()
 Return a range of all the blocks. More...
 
const_block_iterator blocks_begin () const
 Return an iterator to the first block. More...
 
const_block_iterator blocks_end () const
 Return an iterator to the element following the last block. More...
 
const_block_range blocks () const
 Return a range of all the blocks. More...
 
block_subrange findBlocksOn (Addr A)
 Find all the blocks that have bytes that lie within the address specified. More...
 
const_block_subrange findBlocksOn (Addr A) const
 Find all the blocks that have bytes that lie within the address specified. More...
 
block_range findBlocksAt (Addr A)
 Find all the blocks that start at an address. More...
 
block_range findBlocksAt (Addr Low, Addr High)
 Find all the blocks that start between a range of addresses. More...
 
const_block_range findBlocksAt (Addr A) const
 Find all the blocks that start at an address. More...
 
const_block_range findBlocksAt (Addr Low, Addr High) const
 Find all the blocks that start between a range of addresses. More...
 

CodeBlock-Related Public Types and Functions

using code_block_iterator = MergeSortedIterator< Section::code_block_iterator, AddressLess >
 Iterator over CodeBlock objects. More...
 
using code_block_range = boost::iterator_range< code_block_iterator >
 Range of CodeBlock objects. More...
 
using code_block_subrange = boost::iterator_range< MergeSortedIterator< Section::code_block_subrange::iterator, AddressLess > >
 Sub-range of CodeBlock objects overlapping an address or range of addreses. More...
 
using const_code_block_iterator = MergeSortedIterator< Section::const_code_block_iterator, AddressLess >
 Iterator over CodeBlock objects. More...
 
using const_code_block_range = boost::iterator_range< const_code_block_iterator >
 Range of CodeBlock objects. More...
 
using const_code_block_subrange = boost::iterator_range< MergeSortedIterator< Section::const_code_block_subrange::iterator, AddressLess > >
 Sub-range of CodeBlock objects overlapping an address or range of addreses. More...
 
code_block_iterator code_blocks_begin ()
 Return an iterator to the first CodeBlock. More...
 
code_block_iterator code_blocks_end ()
 Return an iterator to the element following the last CodeBlock. More...
 
code_block_range code_blocks ()
 Return a range of all the CodeBlock objects. More...
 
const_code_block_iterator code_blocks_begin () const
 Return an iterator to the first CodeBlock. More...
 
const_code_block_iterator code_blocks_end () const
 Return an iterator to the element following the last CodeBlock. More...
 
const_code_block_range code_blocks () const
 Return a range of all the CodeBlock objects. More...
 
code_block_subrange findCodeBlocksOn (Addr A)
 Find all the code blocks that have bytes that lie within the address specified. More...
 
const_code_block_subrange findCodeBlocksOn (Addr A) const
 Find all the code blocks that have bytes that lie within the address specified. More...
 
code_block_range findCodeBlocksAt (Addr A)
 Find all the code blocks that start at an address. More...
 
code_block_range findCodeBlocksAt (Addr Low, Addr High)
 Find all the code blocks that start between a range of addresses. More...
 
const_code_block_range findCodeBlocksAt (Addr A) const
 Find all the code blocks that start at an address. More...
 
const_code_block_range findCodeBlocksAt (Addr Low, Addr High) const
 Find all the code blocks that start between a range of addresses. More...
 

DataBlock-Related Public Types and Functions

using data_block_iterator = MergeSortedIterator< Section::data_block_iterator, AddressLess >
 Iterator over DataBlock objects. More...
 
using data_block_range = boost::iterator_range< data_block_iterator >
 Range of DataBlock objects. More...
 
using data_block_subrange = boost::iterator_range< MergeSortedIterator< Section::data_block_subrange::iterator, AddressLess > >
 Sub-range of DataBlock objects overlapping an address or range of addreses. More...
 
using const_data_block_iterator = MergeSortedIterator< Section::const_data_block_iterator, AddressLess >
 Iterator over DataBlock objects. More...
 
using const_data_block_range = boost::iterator_range< const_data_block_iterator >
 Range of DataBlock objects. More...
 
using const_data_block_subrange = boost::iterator_range< MergeSortedIterator< Section::const_data_block_subrange::iterator, AddressLess > >
 Sub-range of DataBlock objects overlapping an address or range of addreses. More...
 
data_block_iterator data_blocks_begin ()
 Return an iterator to the first DataBlock. More...
 
data_block_iterator data_blocks_end ()
 Return an iterator to the element following the last DataBlock. More...
 
data_block_range data_blocks ()
 Return a range of all the DataBlock objects. More...
 
const_data_block_iterator data_blocks_begin () const
 Return an iterator to the first DataBlock. More...
 
const_data_block_iterator data_blocks_end () const
 Return an iterator to the element following the last DataBlock. More...
 
const_data_block_range data_blocks () const
 Return a range of all the DataBlock objects. More...
 
data_block_subrange findDataBlocksOn (Addr A)
 Find all the data blocks that have bytes that lie within the address specified. More...
 
const_data_block_subrange findDataBlocksOn (Addr A) const
 Find all the data blocks that have bytes that lie within the address specified. More...
 
data_block_range findDataBlocksAt (Addr A)
 Find all the data blocks that start at an address. More...
 
data_block_range findDataBlocksAt (Addr Low, Addr High)
 Find all the data blocks that start between a range of addresses. More...
 
const_data_block_range findDataBlocksAt (Addr A) const
 Find all the data blocks that start at an address. More...
 
const_data_block_range findDataBlocksAt (Addr Low, Addr High) const
 Find all the data blocks that start between a range of addresses. More...
 

SymbolicExpression-Related Public Types and Functions

using symbolic_expression_iterator = MergeSortedIterator< Section::symbolic_expression_iterator, ByteInterval::SymbolicExpressionElement::AddressLess >
 Iterator over SymbolicExpressionElement objects. More...
 
using symbolic_expression_range = boost::iterator_range< symbolic_expression_iterator >
 Range of SymbolicExpressionElement objects. More...
 
using const_symbolic_expression_iterator = MergeSortedIterator< Section::const_symbolic_expression_iterator, ByteInterval::ConstSymbolicExpressionElement::AddressLess >
 Iterator over SymbolicExpressionElement objects. More...
 
using const_symbolic_expression_range = boost::iterator_range< const_symbolic_expression_iterator >
 Range of SymbolicExpressionElement objects. More...
 
symbolic_expression_iterator symbolic_expressions_begin ()
 Return an iterator to the first SymbolicExpression. More...
 
symbolic_expression_iterator symbolic_expressions_end ()
 Return an iterator to the element following the last SymbolicExpression. More...
 
symbolic_expression_range symbolic_expressions ()
 Return a range of all the SymbolicExpression objects. More...
 
const_symbolic_expression_iterator symbolic_expressions_begin () const
 Return an iterator to the first SymbolicExpression. More...
 
const_symbolic_expression_iterator symbolic_expressions_end () const
 Return an iterator to the element following the last SymbolicExpression. More...
 
const_symbolic_expression_range symbolic_expressions () const
 Return a range of all the SymbolicExpression objects. More...
 
symbolic_expression_range findSymbolicExpressionsAt (Addr A)
 Find all the symbolic expressions that start at an address. More...
 
symbolic_expression_range findSymbolicExpressionsAt (Addr Low, Addr High)
 Find all the symbolic expressions that start between a range of addresses. More...
 
const_symbolic_expression_range findSymbolicExpressionsAt (Addr A) const
 Find all the symbolic expressions that start at an address. More...
 
const_symbolic_expression_range findSymbolicExpressionsAt (Addr Low, Addr High) const
 Find all the symbolic expressions that start between a range of addresses. More...
 

Additional Inherited Members

- Public Types inherited from gtirb::AuxDataContainer
using const_aux_data_iterator = boost::transform_iterator< AccessRawData, AuxDataSet::const_iterator >
 An iterator type for traversing the AuxData in this container. More...
 
using const_aux_data_range = boost::iterator_range< const_aux_data_iterator >
 

Detailed Description

Represents a single binary (library or executable).

Member Typedef Documentation

◆ block_iterator

using gtirb::Module::block_iterator = MergeSortedIterator<Section::block_iterator, BlockAddressLess>

Iterator over blocks.

Blocks are yielded in address order, ascending. For more details, see the documentation on iteration order.

◆ block_range

using gtirb::Module::block_range = boost::iterator_range<block_iterator>

Range of blocks.

Blocks are yielded in address order, ascending. For more details, see the documentation on iteration order.

◆ block_subrange

using gtirb::Module::block_subrange = boost::iterator_range< MergeSortedIterator<Section::block_subrange::iterator, BlockAddressLess> >

Sub-range of blocks overlapping an address or range of addreses.

Blocks are yielded in address order, ascending. For more details, see the documentation on iteration order.

◆ byte_interval_iterator

Iterator over ByteInterval objects.

◆ byte_interval_range

Range of ByteInterval objects.

◆ byte_interval_subrange

using gtirb::Module::byte_interval_subrange = boost::iterator_range<MergeSortedIterator< Section::byte_interval_subrange::iterator, AddressLess> >

Sub-range of ByteInterval objects overlapping addresses.

◆ code_block_iterator

using gtirb::Module::code_block_iterator = MergeSortedIterator<Section::code_block_iterator, AddressLess>

Iterator over CodeBlock objects.

Blocks are yielded in address order, ascending. For more details, see the documentation on iteration order.

◆ code_block_range

using gtirb::Module::code_block_range = boost::iterator_range<code_block_iterator>

Range of CodeBlock objects.

Blocks are yielded in address order, ascending. For more details, see the documentation on iteration order.

◆ code_block_subrange

using gtirb::Module::code_block_subrange = boost::iterator_range< MergeSortedIterator<Section::code_block_subrange::iterator, AddressLess> >

Sub-range of CodeBlock objects overlapping an address or range of addreses.

Blocks are yielded in address order, ascending. For more details, see the documentation on iteration order.

◆ const_block_iterator

using gtirb::Module::const_block_iterator = MergeSortedIterator<Section::const_block_iterator, BlockAddressLess>

Iterator over blocks.

Blocks are yielded in address order, ascending. For more details, see the documentation on iteration order.

◆ const_block_range

Range of blocks.

Blocks are yielded in address order, ascending. For more details, see the documentation on iteration order.

◆ const_block_subrange

using gtirb::Module::const_block_subrange = boost::iterator_range<MergeSortedIterator< Section::const_block_subrange::iterator, BlockAddressLess> >

Sub-range of blocks overlapping an address or range of addreses.

Blocks are yielded in address order, ascending.

◆ const_byte_interval_iterator

Const iterator over ByteInterval objects.

◆ const_byte_interval_range

Const range of ByteInterval objects.

◆ const_byte_interval_subrange

using gtirb::Module::const_byte_interval_subrange = boost::iterator_range<MergeSortedIterator< Section::const_byte_interval_subrange::iterator, AddressLess> >

Sub-range of ByteInterval objects overlapping addresses.

◆ const_code_block_iterator

Iterator over CodeBlock objects.

Blocks are yielded in address order, ascending. For more details, see the documentation on iteration order.

◆ const_code_block_range

Range of CodeBlock objects.

Blocks are yielded in address order, ascending. For more details, see the documentation on iteration order.

◆ const_code_block_subrange

using gtirb::Module::const_code_block_subrange = boost::iterator_range<MergeSortedIterator< Section::const_code_block_subrange::iterator, AddressLess> >

Sub-range of CodeBlock objects overlapping an address or range of addreses.

Blocks are yielded in address order, ascending. For more details, see the documentation on iteration order.

◆ const_data_block_iterator

Iterator over DataBlock objects.

Blocks are yielded in address order, ascending. For more details, see the documentation on iteration order.

◆ const_data_block_range

Range of DataBlock objects.

Blocks are yielded in address order, ascending. For more details, see the documentation on iteration order.

◆ const_data_block_subrange

using gtirb::Module::const_data_block_subrange = boost::iterator_range<MergeSortedIterator< Section::const_data_block_subrange::iterator, AddressLess> >

Sub-range of DataBlock objects overlapping an address or range of addreses.

Blocks are yielded in address order, ascending. For more details, see the documentation on iteration order.

◆ const_proxy_block_iterator

using gtirb::Module::const_proxy_block_iterator = boost::indirect_iterator<ProxyBlockSet::const_iterator, const ProxyBlock>

Constant iterator over proxy_blocks (ProxyBlock).

◆ const_proxy_block_range

Constant range of proxy_blocks (ProxyBlock).

◆ const_section_iterator

using gtirb::Module::const_section_iterator = boost::indirect_iterator<SectionSet::const_iterator, const Section&>

Constant iterator over sections (Section).

Sections are returned in address order. If two Sections start at the same address, the smaller one is returned first. If two Sections have the same address and the same size, their order is not specified.

◆ const_section_name_iterator

using gtirb::Module::const_section_name_iterator = boost::indirect_iterator<SectionSet::index<by_name>::type::const_iterator, const Section&>

Constant iterator over sections (Section).

Sections are returned in name order. If two Sections have the same name, their order is not specified.

◆ const_section_name_range

Constant range of sections (Section).

Sections are returned in name order. If two Sections have the same name, their order is not specified.

◆ const_section_range

Constant range of sections (Section).

Sections are returned in address order. If two Sections start at the same address, the smaller one is returned first. If two Sections have the same address and the same size, their order is not specified.

◆ const_section_subrange

using gtirb::Module::const_section_subrange = boost::iterator_range<boost::indirect_iterator< SectionIntMap::codomain_type::const_iterator, const Section&> >

Sub-range of sections overlapping an address (Section).

◆ const_symbol_addr_iterator

using gtirb::Module::const_symbol_addr_iterator = boost::indirect_iterator< SymbolSet::index<by_address>::type::const_iterator, const Symbol>

Constant iterator over symbols (Symbol).

This iterator returns symbols in address order. If two Symbols have the same address, their order is unspecified.

◆ const_symbol_addr_range

Constant range of symbols (Symbol).

This range returns symbols in address order. If two Symbols have the same address, their order is unspecified.

◆ const_symbol_iterator

using gtirb::Module::const_symbol_iterator = boost::indirect_iterator< SymbolSet::index<by_pointer>::type::const_iterator, const Symbol>

Constant iterator over symbols (Symbol).

This iterator returns symbols in an arbitrary order.

◆ const_symbol_name_iterator

using gtirb::Module::const_symbol_name_iterator = boost::indirect_iterator<SymbolSet::index<by_name>::type::const_iterator, const Symbol>

Constant iterator over symbols (Symbol).

This iterator returns symbols in name order. If two Symbols have the same name, their order is unspecified.

◆ const_symbol_name_range

Constant range of symbols (Symbol).

This range returns symbols in name order. If two Symbols have the same name, their order is unspecified.

◆ const_symbol_range

Constant range of symbols (Symbol).

This range returns symbols in an arbitrary order.

◆ const_symbol_ref_iterator

using gtirb::Module::const_symbol_ref_iterator = boost::indirect_iterator< SymbolSet::index<by_referent>::type::const_iterator, const Symbol>

Constant iterator over symbols (Symbol).

The order in which this iterator returns symbols is not specified.

◆ const_symbol_ref_range

Constant range of symbols (Symbol).

The order of the symbols in this range is not specified.

◆ const_symbolic_expression_iterator

Iterator over SymbolicExpressionElement objects.

Results are yielded in address order, ascending.

◆ const_symbolic_expression_range

Range of SymbolicExpressionElement objects.

Results are yielded in address order, ascending.

◆ data_block_iterator

using gtirb::Module::data_block_iterator = MergeSortedIterator<Section::data_block_iterator, AddressLess>

Iterator over DataBlock objects.

Blocks are yielded in address order, ascending. For more details, see the documentation on iteration order.

◆ data_block_range

using gtirb::Module::data_block_range = boost::iterator_range<data_block_iterator>

Range of DataBlock objects.

Blocks are yielded in address order, ascending. For more details, see the documentation on iteration order.

◆ data_block_subrange

using gtirb::Module::data_block_subrange = boost::iterator_range< MergeSortedIterator<Section::data_block_subrange::iterator, AddressLess> >

Sub-range of DataBlock objects overlapping an address or range of addreses.

Blocks are yielded in address order, ascending. For more details, see the documentation on iteration order.

◆ proxy_block_iterator

using gtirb::Module::proxy_block_iterator = boost::indirect_iterator<ProxyBlockSet::iterator>

Iterator over proxy_blocks (ProxyBlock).

◆ proxy_block_range

Range of proxy_blocks (ProxyBlock).

◆ section_iterator

using gtirb::Module::section_iterator = boost::indirect_iterator<SectionSet::iterator>

Iterator over sections (Section).

◆ section_name_iterator

using gtirb::Module::section_name_iterator = boost::indirect_iterator<SectionSet::index<by_name>::type::iterator>

Iterator over sections (Section).

Sections are returned in name order. If two Sections have the same name, their order is not specified.

◆ section_name_range

Range of sections (Section).

Sections are returned in name order. If two Sections have the same name, their order is not specified.

◆ section_range

using gtirb::Module::section_range = boost::iterator_range<section_iterator>

Range of sections (Section).

◆ section_subrange

using gtirb::Module::section_subrange = boost::iterator_range< boost::indirect_iterator<SectionIntMap::codomain_type::iterator> >

Sub-range of sections overlapping an address (Section).

◆ symbol_addr_iterator

using gtirb::Module::symbol_addr_iterator = boost::indirect_iterator<SymbolSet::index<by_address>::type::iterator>

Iterator over symbols (Symbol).

This iterator returns symbols in address order. If two Symbols have the same address, their order is unspecified.

◆ symbol_addr_range

Range of symbols (Symbol).

This range returns symbols in address order. If two Symbols have the same address, their order is unspecified.

◆ symbol_iterator

using gtirb::Module::symbol_iterator = boost::indirect_iterator<SymbolSet::index<by_pointer>::type::iterator>

Iterator over symbols (Symbol).

This iterator returns symbols in an arbitrary order.

◆ symbol_name_iterator

using gtirb::Module::symbol_name_iterator = boost::indirect_iterator<SymbolSet::index<by_name>::type::iterator>

Iterator over symbols (Symbol).

This iterator returns symbols in name order. If two Symbols have the same name, their order is unspecified.

◆ symbol_name_range

Range of symbols (Symbol).

This range returns symbols in name order. If two Symbols have the same name, their order is unspecified.

◆ symbol_range

using gtirb::Module::symbol_range = boost::iterator_range<symbol_iterator>

Range of symbols (Symbol).

This range returns symbols in an arbitrary order.

◆ symbol_ref_iterator

using gtirb::Module::symbol_ref_iterator = boost::indirect_iterator<SymbolSet::index<by_referent>::type::iterator>

Iterator over symbols (Symbol).

The order in which this iterator returns symbols is not specified.

◆ symbol_ref_range

using gtirb::Module::symbol_ref_range = boost::iterator_range<symbol_ref_iterator>

Range of symbols (Symbol).

The order of the symbols in this range is not specified.

◆ symbolic_expression_iterator

Iterator over SymbolicExpressionElement objects.

Results are yielded in address order, ascending.

◆ symbolic_expression_range

Range of SymbolicExpressionElement objects.

Results are yielded in address order, ascending.

Member Function Documentation

◆ addProxyBlock() [1/2]

template<typename... Args>
ProxyBlock* gtirb::Module::addProxyBlock ( Context C,
Args &&...  A 
)
inline

Creates a new ProxyBlock in this module.

Template Parameters
ArgsThe arguments to construct a ProxyBlock.
Parameters
CThe Context in which this object will be held.
AThe arguments to construct a ProxyBlock.
Returns
the created ProxyBlock.

◆ addProxyBlock() [2/2]

ChangeStatus gtirb::Module::addProxyBlock ( ProxyBlock PB)

Adds a new ProxyBlock in this module.

Parameters
PBThe ProxyBlock object to add.
Returns
a ChangeStatus indicating whether the insertion took place (Accepted), was unnecessary because this node already contained the ProxyBlock (NoChange), or could not be completed (Rejected).

◆ addSection() [1/2]

template<typename... Args>
Section* gtirb::Module::addSection ( Context C,
Args &&...  A 
)
inline

Creates a new Section in this module.

Template Parameters
ArgsThe arguments to construct a Section.
Parameters
CThe Context in which this object will be held.
AThe arguments to construct a Section.
Returns
the created Section.

◆ addSection() [2/2]

ChangeStatus gtirb::Module::addSection ( Section S)

Move a Section object to be located in this module.

Parameters
SThe Section object to add.
Returns
a ChangeStatus indicating whether the insertion took place (Accepted), was unnecessary because this node already contained the

◆ addSymbol() [1/2]

template<typename... Args>
Symbol* gtirb::Module::addSymbol ( Context C,
Args...  A 
)
inline

Creates a new Symbol in this module.

Template Parameters
ArgsThe arguments to construct a Symbol.
Parameters
CThe Context in which this object will be held.
AThe arguments to construct a Symbol.

◆ addSymbol() [2/2]

Symbol* gtirb::Module::addSymbol ( Symbol S)
inline

Move a Symbol object to be located in this module.

Parameters
SThe Symbol object to add.

◆ blocks() [1/2]

block_range gtirb::Module::blocks ( )
inline

Return a range of all the blocks.

◆ blocks() [2/2]

const_block_range gtirb::Module::blocks ( ) const
inline

Return a range of all the blocks.

◆ blocks_begin() [1/2]

block_iterator gtirb::Module::blocks_begin ( )
inline

Return an iterator to the first block.

◆ blocks_begin() [2/2]

const_block_iterator gtirb::Module::blocks_begin ( ) const
inline

Return an iterator to the first block.

◆ blocks_end() [1/2]

block_iterator gtirb::Module::blocks_end ( )
inline

Return an iterator to the element following the last block.

◆ blocks_end() [2/2]

const_block_iterator gtirb::Module::blocks_end ( ) const
inline

Return an iterator to the element following the last block.

◆ byte_intervals() [1/2]

byte_interval_range gtirb::Module::byte_intervals ( )
inline

Return a range of all the ByteInterval objects.

◆ byte_intervals() [2/2]

const_byte_interval_range gtirb::Module::byte_intervals ( ) const
inline

Return a range of all the ByteInterval objects.

◆ byte_intervals_begin() [1/2]

byte_interval_iterator gtirb::Module::byte_intervals_begin ( )
inline

Return an iterator to the first ByteInterval.

◆ byte_intervals_begin() [2/2]

const_byte_interval_iterator gtirb::Module::byte_intervals_begin ( ) const
inline

Return an iterator to the first ByteInterval.

◆ byte_intervals_end() [1/2]

byte_interval_iterator gtirb::Module::byte_intervals_end ( )
inline

Return an iterator to the element following the last ByteInterval.

◆ byte_intervals_end() [2/2]

const_byte_interval_iterator gtirb::Module::byte_intervals_end ( ) const
inline

Return an iterator to the element following the last ByteInterval.

◆ code_blocks() [1/2]

code_block_range gtirb::Module::code_blocks ( )
inline

Return a range of all the CodeBlock objects.

◆ code_blocks() [2/2]

const_code_block_range gtirb::Module::code_blocks ( ) const
inline

Return a range of all the CodeBlock objects.

◆ code_blocks_begin() [1/2]

code_block_iterator gtirb::Module::code_blocks_begin ( )
inline

Return an iterator to the first CodeBlock.

◆ code_blocks_begin() [2/2]

const_code_block_iterator gtirb::Module::code_blocks_begin ( ) const
inline

Return an iterator to the first CodeBlock.

◆ code_blocks_end() [1/2]

code_block_iterator gtirb::Module::code_blocks_end ( )
inline

Return an iterator to the element following the last CodeBlock.

◆ code_blocks_end() [2/2]

const_code_block_iterator gtirb::Module::code_blocks_end ( ) const
inline

Return an iterator to the element following the last CodeBlock.

◆ Create()

static Module* gtirb::Module::Create ( Context C,
const std::string &  Name 
)
inlinestatic

Create a Module object.

Parameters
CThe Context in which this object will be held.
NameThe name of this module.
Returns
The newly created object.

◆ data_blocks() [1/2]

data_block_range gtirb::Module::data_blocks ( )
inline

Return a range of all the DataBlock objects.

◆ data_blocks() [2/2]

const_data_block_range gtirb::Module::data_blocks ( ) const
inline

Return a range of all the DataBlock objects.

◆ data_blocks_begin() [1/2]

data_block_iterator gtirb::Module::data_blocks_begin ( )
inline

Return an iterator to the first DataBlock.

◆ data_blocks_begin() [2/2]

const_data_block_iterator gtirb::Module::data_blocks_begin ( ) const
inline

Return an iterator to the first DataBlock.

◆ data_blocks_end() [1/2]

data_block_iterator gtirb::Module::data_blocks_end ( )
inline

Return an iterator to the element following the last DataBlock.

◆ data_blocks_end() [2/2]

const_data_block_iterator gtirb::Module::data_blocks_end ( ) const
inline

Return an iterator to the element following the last DataBlock.

◆ findBlocksAt() [1/4]

block_range gtirb::Module::findBlocksAt ( Addr  A)
inline

Find all the blocks that start at an address.

Parameters
AThe address to look up.
Returns
A range of Node objects, which are either DataBlock objects or CodeBlock objects, that are at the address A.

◆ findBlocksAt() [2/4]

const_block_range gtirb::Module::findBlocksAt ( Addr  A) const
inline

Find all the blocks that start at an address.

Parameters
AThe address to look up.
Returns
A range of Node objects, which are either DataBlock objects or CodeBlock objects, that are at the address A.

◆ findBlocksAt() [3/4]

block_range gtirb::Module::findBlocksAt ( Addr  Low,
Addr  High 
)
inline

Find all the blocks that start between a range of addresses.

Parameters
LowThe low address, inclusive.
HighThe high address, exclusive.
Returns
A range of Node objects, which are either DataBlock objects or CodeBlock objects, that are between the addresses.

◆ findBlocksAt() [4/4]

const_block_range gtirb::Module::findBlocksAt ( Addr  Low,
Addr  High 
) const
inline

Find all the blocks that start between a range of addresses.

Parameters
LowThe low address, inclusive.
HighThe high address, exclusive.
Returns
A range of Node objects, which are either DataBlock objects or CodeBlock objects, that are between the addresses.

◆ findBlocksOn() [1/2]

block_subrange gtirb::Module::findBlocksOn ( Addr  A)
inline

Find all the blocks that have bytes that lie within the address specified.

Parameters
AThe address to look up.
Returns
A range of Node objects, which are either DataBlock objects or CodeBlock objects, that intersect the address A.

◆ findBlocksOn() [2/2]

const_block_subrange gtirb::Module::findBlocksOn ( Addr  A) const
inline

Find all the blocks that have bytes that lie within the address specified.

Parameters
AThe address to look up.
Returns
A range of Node objects, which are either DataBlock objects or CodeBlock objects, that intersect the address A.

◆ findByteIntervalsAt() [1/4]

byte_interval_range gtirb::Module::findByteIntervalsAt ( Addr  A)
inline

Find all the intervals that start at an address.

Parameters
AThe address to look up.
Returns
A range of ByteInterval objects that are at the address A.

◆ findByteIntervalsAt() [2/4]

const_byte_interval_range gtirb::Module::findByteIntervalsAt ( Addr  A) const
inline

Find all the intervals that start at an address.

Parameters
AThe address to look up.
Returns
A range of ByteInterval objects that are at the address A.

◆ findByteIntervalsAt() [3/4]

byte_interval_range gtirb::Module::findByteIntervalsAt ( Addr  Low,
Addr  High 
)
inline

Find all the intervals that start between a range of addresses.

Parameters
LowThe low address, inclusive.
HighThe high address, exclusive.
Returns
A range of ByteInterval objects that are between the addresses.

◆ findByteIntervalsAt() [4/4]

const_byte_interval_range gtirb::Module::findByteIntervalsAt ( Addr  Low,
Addr  High 
) const
inline

Find all the intervals that start between a range of addresses.

Parameters
LowThe low address, inclusive.
HighThe high address, exclusive.
Returns
A range of ByteInterval objects that are between the addresses.

◆ findByteIntervalsOn() [1/2]

byte_interval_subrange gtirb::Module::findByteIntervalsOn ( Addr  A)
inline

Find all the intervals that contain the address specified.

Parameters
AThe address to look up.
Returns
A range of ByteInterval objects that intersect the address A.

◆ findByteIntervalsOn() [2/2]

const_byte_interval_subrange gtirb::Module::findByteIntervalsOn ( Addr  A) const
inline

Find all the intervals that contain the address specified.

Parameters
AThe address to look up.
Returns
A range of ByteInterval objects that intersect the address A.

◆ findCodeBlocksAt() [1/4]

code_block_range gtirb::Module::findCodeBlocksAt ( Addr  A)
inline

Find all the code blocks that start at an address.

Parameters
AThe address to look up.
Returns
A range of CodeBlock objects that are at the address A.

◆ findCodeBlocksAt() [2/4]

const_code_block_range gtirb::Module::findCodeBlocksAt ( Addr  A) const
inline

Find all the code blocks that start at an address.

Parameters
AThe address to look up.
Returns
A range of CodeBlock objects that are at the address A.

◆ findCodeBlocksAt() [3/4]

code_block_range gtirb::Module::findCodeBlocksAt ( Addr  Low,
Addr  High 
)
inline

Find all the code blocks that start between a range of addresses.

Parameters
LowThe low address, inclusive.
HighThe high address, exclusive.
Returns
A range of CodeBlock objects that are between the addresses.

◆ findCodeBlocksAt() [4/4]

const_code_block_range gtirb::Module::findCodeBlocksAt ( Addr  Low,
Addr  High 
) const
inline

Find all the code blocks that start between a range of addresses.

Parameters
LowThe low address, inclusive.
HighThe high address, exclusive.
Returns
A range of CodeBlock objects that are between the addresses.

◆ findCodeBlocksOn() [1/2]

code_block_subrange gtirb::Module::findCodeBlocksOn ( Addr  A)
inline

Find all the code blocks that have bytes that lie within the address specified.

Parameters
AThe address to look up.
Returns
A range of CodeNode object that intersect the address A.

◆ findCodeBlocksOn() [2/2]

const_code_block_subrange gtirb::Module::findCodeBlocksOn ( Addr  A) const
inline

Find all the code blocks that have bytes that lie within the address specified.

Parameters
AThe address to look up.
Returns
A range of CodeBlock objects that intersect the address A.

◆ findDataBlocksAt() [1/4]

data_block_range gtirb::Module::findDataBlocksAt ( Addr  A)
inline

Find all the data blocks that start at an address.

Parameters
AThe address to look up.
Returns
A range of DataBlock objects that are at the address A.

◆ findDataBlocksAt() [2/4]

const_data_block_range gtirb::Module::findDataBlocksAt ( Addr  A) const
inline

Find all the data blocks that start at an address.

Parameters
AThe address to look up.
Returns
A range of DataBlock objects that are at the address A.

◆ findDataBlocksAt() [3/4]

data_block_range gtirb::Module::findDataBlocksAt ( Addr  Low,
Addr  High 
)
inline

Find all the data blocks that start between a range of addresses.

Parameters
LowThe low address, inclusive.
HighThe high address, exclusive.
Returns
A range of DataBlock objects that are between the addresses.

◆ findDataBlocksAt() [4/4]

const_data_block_range gtirb::Module::findDataBlocksAt ( Addr  Low,
Addr  High 
) const
inline

Find all the data blocks that start between a range of addresses.

Parameters
LowThe low address, inclusive.
HighThe high address, exclusive.
Returns
A range of DataBlock objects that are between the addresses.

◆ findDataBlocksOn() [1/2]

data_block_subrange gtirb::Module::findDataBlocksOn ( Addr  A)
inline

Find all the data blocks that have bytes that lie within the address specified.

Parameters
AThe address to look up.
Returns
A range of DataNode object that intersect the address A.

◆ findDataBlocksOn() [2/2]

const_data_block_subrange gtirb::Module::findDataBlocksOn ( Addr  A) const
inline

Find all the data blocks that have bytes that lie within the address specified.

Parameters
AThe address to look up.
Returns
A range of DataNode object that intersect the address A.

◆ findSections() [1/2]

section_name_range gtirb::Module::findSections ( const std::string &  X)
inline

Find a Section by name.

Parameters
XThe name to look up.
Returns
A range of Section objects with the requested name.

◆ findSections() [2/2]

const_section_name_range gtirb::Module::findSections ( const std::string &  X) const
inline

Find a Section by name.

Parameters
XThe name to look up.
Returns
A range of Section objects with the requested name.

◆ findSectionsAt() [1/4]

section_range gtirb::Module::findSectionsAt ( Addr  A)
inline

Find all the sections that start at an address.

Parameters
AThe address to look up.
Returns
A range of Section objects that are at the address A.

◆ findSectionsAt() [2/4]

const_section_range gtirb::Module::findSectionsAt ( Addr  A) const
inline

Find all the sections that start at an address.

Parameters
AThe address to look up.
Returns
A range of Section objects that are at the address A.

◆ findSectionsAt() [3/4]

section_range gtirb::Module::findSectionsAt ( Addr  Low,
Addr  High 
)
inline

Find all the sections that start between a range of addresses.

Parameters
LowThe low address, inclusive.
HighThe high address, exclusive.
Returns
A range of Section objects that are between the addresses.

◆ findSectionsAt() [4/4]

const_section_range gtirb::Module::findSectionsAt ( Addr  Low,
Addr  High 
) const
inline

Find all the sections that start between a range of addresses.

Parameters
LowThe low address, inclusive.
HighThe high address, exclusive.
Returns
A range of Section objects that are between the addresses.

◆ findSectionsOn() [1/2]

section_subrange gtirb::Module::findSectionsOn ( Addr  X)
inline

Find a Section containing an address.

Parameters
XThe address to look up.
Returns
The range of Sections containing the address.

◆ findSectionsOn() [2/2]

const_section_subrange gtirb::Module::findSectionsOn ( Addr  X) const
inline

Find a Section containing an address.

Parameters
XThe address to look up.
Returns
The range of Sections containing the address.

◆ findSymbolicExpressionsAt() [1/4]

symbolic_expression_range gtirb::Module::findSymbolicExpressionsAt ( Addr  A)
inline

Find all the symbolic expressions that start at an address.

Parameters
AThe address to look up.
Returns
A range of SymbolicExpression objects that are at the address A.

◆ findSymbolicExpressionsAt() [2/4]

const_symbolic_expression_range gtirb::Module::findSymbolicExpressionsAt ( Addr  A) const
inline

Find all the symbolic expressions that start at an address.

Parameters
AThe address to look up.
Returns
A range of SymbolicExpression objects that are at the address A.

◆ findSymbolicExpressionsAt() [3/4]

symbolic_expression_range gtirb::Module::findSymbolicExpressionsAt ( Addr  Low,
Addr  High 
)
inline

Find all the symbolic expressions that start between a range of addresses.

Parameters
LowThe low address, inclusive.
HighThe high address, exclusive.
Returns
A range of SymbolicExpression objects that are between the addresses.

◆ findSymbolicExpressionsAt() [4/4]

const_symbolic_expression_range gtirb::Module::findSymbolicExpressionsAt ( Addr  Low,
Addr  High 
) const
inline

Find all the symbolic expressions that start between a range of addresses.

Parameters
LowThe low address, inclusive.
HighThe high address, exclusive.
Returns
A range of SymbolicExpression objects that are between the addresses.

◆ findSymbols() [1/8]

symbol_addr_range gtirb::Module::findSymbols ( Addr  Lower,
Addr  Upper 
)
inline

Find symbols by a range of addresses.

Parameters
LowerThe lower-bounded address to look up.
UpperThe upper-bounded address to look up.
Returns
A possibly empty range of all the symbols within the given address range. Searches the range [Lower, Upper).

◆ findSymbols() [2/8]

const_symbol_addr_range gtirb::Module::findSymbols ( Addr  Lower,
Addr  Upper 
) const
inline

Find symbols by a range of addresses.

Parameters
LowerThe lower-bounded address to look up.
UpperThe upper-bounded address to look up.
Returns
A possibly empty constant range of all the symbols within the given address range. Searches the range [Lower, Upper).

◆ findSymbols() [3/8]

symbol_addr_range gtirb::Module::findSymbols ( Addr  X)
inline

Find symbols by address.

Parameters
XThe address to look up.
Returns
A possibly empty range of all the symbols with a referent at the given address.

◆ findSymbols() [4/8]

const_symbol_addr_range gtirb::Module::findSymbols ( Addr  X) const
inline

Find symbols by address.

Parameters
XThe address to look up.
Returns
A possibly empty constant range of all the symbols with a referent at the given address.

◆ findSymbols() [5/8]

symbol_ref_range gtirb::Module::findSymbols ( const Node Referent)
inline

Find symbols by their referent object.

Parameters
ReferentThe object the symbol refers to.
Returns
A possibly empty range of all the symbols that refer to the given object.

◆ findSymbols() [6/8]

const_symbol_ref_range gtirb::Module::findSymbols ( const Node Referent) const
inline

Find symbols by their referent object.

Parameters
ReferentThe object the symbol refers to.
Returns
A possibly empty range of all the symbols that refer to the given object.

◆ findSymbols() [7/8]

symbol_name_range gtirb::Module::findSymbols ( const std::string &  N)
inline

Find symbols by name.

Parameters
NThe name to look up.
Returns
A possibly empty range of all the symbols with the given name.

◆ findSymbols() [8/8]

const_symbol_name_range gtirb::Module::findSymbols ( const std::string &  N) const
inline

Find symbols by name.

Parameters
NThe name to look up.
Returns
A possibly empty constant range of all the symbols with the given name.

◆ getBinaryPath()

const std::string& gtirb::Module::getBinaryPath ( ) const
inline

Get the location of the corresponding binary on disk.

Returns
The path to the corresponding binary on disk.

◆ getByteOrder()

gtirb::ByteOrder gtirb::Module::getByteOrder ( ) const
inline

Get the endianness of the instructions in this Module.

Returns
The endianness.

◆ getEntryPoint() [1/2]

CodeBlock* gtirb::Module::getEntryPoint ( )
inline

Get the entry point of this module, or null if not present.

◆ getEntryPoint() [2/2]

const CodeBlock* gtirb::Module::getEntryPoint ( ) const
inline

Get the entry point of this module, or null if not present.

◆ getFileFormat()

gtirb::FileFormat gtirb::Module::getFileFormat ( ) const
inline

Get the format of the binary pointed to by getBinaryPath().

Returns
The format of the binary associated with this, as a gtirb::FileFormat enumerator.

◆ getIR() [1/2]

IR* gtirb::Module::getIR ( )
inline

Get the IR this module belongs to.

◆ getIR() [2/2]

const IR* gtirb::Module::getIR ( ) const
inline

Get the IR this module belongs to.

◆ getISA()

gtirb::ISA gtirb::Module::getISA ( ) const
inline

Get the ISA of the instructions in this Module.

Returns
The ISA ID.

◆ getName()

const std::string& gtirb::Module::getName ( ) const
inline

Get the module name.

Returns
The name.

◆ getPreferredAddr()

gtirb::Addr gtirb::Module::getPreferredAddr ( ) const
inline

Get the preferred address for loading this module.

Returns
The preferred address.
See also
getRebaseDelta

◆ getRebaseDelta()

int64_t gtirb::Module::getRebaseDelta ( ) const
inline

Get the difference between this module's preferred address and the address where it was actually loaded.

Returns
The rebase delta.

◆ isRelocated()

bool gtirb::Module::isRelocated ( ) const
inline

Has the image been loaded somewhere other than its preferred address?

Returns
true if the loaded image has been relocated, false otherwise.
See also
getPreferredAddr
getRebaseDelta

◆ proxy_blocks() [1/2]

proxy_block_range gtirb::Module::proxy_blocks ( )
inline

Return a range of the proxy_blocks (ProxyBlock).

◆ proxy_blocks() [2/2]

const_proxy_block_range gtirb::Module::proxy_blocks ( ) const
inline

Return a constant range of the proxy_blocks (ProxyBlock).

◆ proxy_blocks_begin() [1/2]

proxy_block_iterator gtirb::Module::proxy_blocks_begin ( )
inline

Return an iterator to the first ProxyBlock.

◆ proxy_blocks_begin() [2/2]

const_proxy_block_iterator gtirb::Module::proxy_blocks_begin ( ) const
inline

Return a constant iterator to the first ProxyBlock.

◆ proxy_blocks_end() [1/2]

proxy_block_iterator gtirb::Module::proxy_blocks_end ( )
inline

Return an iterator to the element following the last ProxyBlock.

◆ proxy_blocks_end() [2/2]

const_proxy_block_iterator gtirb::Module::proxy_blocks_end ( ) const
inline

Return a constant iterator to the element following the last ProxyBlock.

◆ removeProxyBlock()

ChangeStatus gtirb::Module::removeProxyBlock ( ProxyBlock B)

Remove a ProxyBlock object located in this module.

Parameters
BThe ProxyBlock object to remove.
Returns
Whether the operation succeeded (Accepted), made no change (NoChange), or could not be completed (Rejected). In particular, if the node to remove is not actually part of this node to begin with, the result will be NoChange.

◆ removeSection()

ChangeStatus gtirb::Module::removeSection ( Section S)

Remove a Section object located in this module.

Parameters
SThe Section object to remove.
Returns
Whether the operation succeeded (Accepted), made no change (NoChange), or could not be completed (Rejected). In particular, if the node to remove is not actually part of this node to begin with, the result will be NoChange.

◆ removeSymbol()

bool gtirb::Module::removeSymbol ( Symbol S)
inline

Remove a Symbol object located in this module.

Parameters
SThe Symbol object to remove.
Returns
Whether or not the operation succeeded. This operation can fail if the node to remove is not actually part of this node to begin with.

◆ sections() [1/2]

section_range gtirb::Module::sections ( )
inline

Return a range of the sections (Section).

◆ sections() [2/2]

const_section_range gtirb::Module::sections ( ) const
inline

Return a constant range of the sections (Section).

◆ sections_begin() [1/2]

section_iterator gtirb::Module::sections_begin ( )
inline

Return an iterator to the first Section.

◆ sections_begin() [2/2]

const_section_iterator gtirb::Module::sections_begin ( ) const
inline

Return a constant iterator to the first Section.

◆ sections_by_name_begin() [1/2]

section_name_iterator gtirb::Module::sections_by_name_begin ( )
inline

Return an iterator to the first Section.

◆ sections_by_name_begin() [2/2]

const_section_name_iterator gtirb::Module::sections_by_name_begin ( ) const
inline

Return a constant iterator to the first Section.

◆ sections_by_name_end() [1/2]

section_name_iterator gtirb::Module::sections_by_name_end ( )
inline

Return an iterator to the element following the last Section.

◆ sections_by_name_end() [2/2]

const_section_name_iterator gtirb::Module::sections_by_name_end ( ) const
inline

Return a constant iterator to the element following the last Section.

◆ sections_end() [1/2]

section_iterator gtirb::Module::sections_end ( )
inline

Return an iterator to the element following the last Section.

◆ sections_end() [2/2]

const_section_iterator gtirb::Module::sections_end ( ) const
inline

Return a constant iterator to the element following the last Section.

◆ setBinaryPath()

void gtirb::Module::setBinaryPath ( const std::string &  X)
inline

Set the location of the corresponding binary on disk.

This is for informational purposes only and will not be used to open the image, so it does not need to be the path of an existing file.

Parameters
XThe path name to use.

◆ setByteOrder()

void gtirb::Module::setByteOrder ( gtirb::ByteOrder  X)
inline

Set the endianness of the instructions in this Module.

Parameters
XThe endianness to set.

◆ setEntryPoint()

void gtirb::Module::setEntryPoint ( CodeBlock CB)
inline

Set the entry point of this module.

Parameters
CBThe entry point of this module, or null if not present.

◆ setFileFormat()

void gtirb::Module::setFileFormat ( gtirb::FileFormat  X)
inline

Set the format of the binary pointed to by getBinaryPath().

Parameters
XThe format of the binary associated with this, as a gtirb::FileFormat enumerator.

◆ setISA()

void gtirb::Module::setISA ( gtirb::ISA  X)
inline

Set the ISA of the instructions in this Module.

Parameters
XThe ISA ID to set.

◆ setName()

void gtirb::Module::setName ( const std::string &  X)
inline

Set the module name.

◆ setPreferredAddr()

void gtirb::Module::setPreferredAddr ( gtirb::Addr  X)
inline

Set the preferred address for loading this module.

Parameters
XThe address to use.
Returns
void
See also
setRebaseDelta

◆ setRebaseDelta()

void gtirb::Module::setRebaseDelta ( int64_t  X)
inline

Set the difference between this module's preferred address and the address where it was actually loaded.

Parameters
XThe rebase delta.
Returns
void

◆ symbolic_expressions() [1/2]

symbolic_expression_range gtirb::Module::symbolic_expressions ( )
inline

Return a range of all the SymbolicExpression objects.

◆ symbolic_expressions() [2/2]

const_symbolic_expression_range gtirb::Module::symbolic_expressions ( ) const
inline

Return a range of all the SymbolicExpression objects.

◆ symbolic_expressions_begin() [1/2]

symbolic_expression_iterator gtirb::Module::symbolic_expressions_begin ( )
inline

Return an iterator to the first SymbolicExpression.

◆ symbolic_expressions_begin() [2/2]

const_symbolic_expression_iterator gtirb::Module::symbolic_expressions_begin ( ) const
inline

Return an iterator to the first SymbolicExpression.

◆ symbolic_expressions_end() [1/2]

symbolic_expression_iterator gtirb::Module::symbolic_expressions_end ( )
inline

Return an iterator to the element following the last SymbolicExpression.

◆ symbolic_expressions_end() [2/2]

const_symbolic_expression_iterator gtirb::Module::symbolic_expressions_end ( ) const
inline

Return an iterator to the element following the last SymbolicExpression.

◆ symbols() [1/2]

symbol_range gtirb::Module::symbols ( )
inline

Return a range of the symbols (Symbol).

◆ symbols() [2/2]

const_symbol_range gtirb::Module::symbols ( ) const
inline

Return a constant range of the symbols (Symbol).

◆ symbols_begin() [1/2]

symbol_iterator gtirb::Module::symbols_begin ( )
inline

Return an iterator to the first Symbol.

◆ symbols_begin() [2/2]

const_symbol_iterator gtirb::Module::symbols_begin ( ) const
inline

Return a constant iterator to the first Symbol.

◆ symbols_by_addr() [1/2]

symbol_addr_range gtirb::Module::symbols_by_addr ( )
inline

Return a range of the symbols (Symbol), ordered by address.

◆ symbols_by_addr() [2/2]

const_symbol_addr_range gtirb::Module::symbols_by_addr ( ) const
inline

Return a constant range of the symbols (Symbol), ordered by address.

◆ symbols_by_addr_begin() [1/2]

symbol_addr_iterator gtirb::Module::symbols_by_addr_begin ( )
inline

Return an iterator to the first Symbol, ordered by address.

◆ symbols_by_addr_begin() [2/2]

const_symbol_addr_iterator gtirb::Module::symbols_by_addr_begin ( ) const
inline

Return a constant iterator to the first Symbol, ordered by address.

◆ symbols_by_addr_end() [1/2]

symbol_addr_iterator gtirb::Module::symbols_by_addr_end ( )
inline

Return an iterator to the element following the last Symbol, ordered by address.

◆ symbols_by_addr_end() [2/2]

const_symbol_addr_iterator gtirb::Module::symbols_by_addr_end ( ) const
inline

Return a constant iterator to the element following the last Symbol, ordered by address.

◆ symbols_by_name() [1/2]

symbol_name_range gtirb::Module::symbols_by_name ( )
inline

Return a range of the symbols (Symbol), ordered by name.

◆ symbols_by_name() [2/2]

const_symbol_name_range gtirb::Module::symbols_by_name ( ) const
inline

Return a constant range of the symbols (Symbol), ordered by name.

◆ symbols_by_name_begin() [1/2]

symbol_name_iterator gtirb::Module::symbols_by_name_begin ( )
inline

Return an iterator to the first Symbol, ordered by name.

◆ symbols_by_name_begin() [2/2]

const_symbol_name_iterator gtirb::Module::symbols_by_name_begin ( ) const
inline

Return a constant iterator to the first Symbol, ordered by name.

◆ symbols_by_name_end() [1/2]

symbol_name_iterator gtirb::Module::symbols_by_name_end ( )
inline

Return an iterator to the element following the last Symbol, ordered by name.

◆ symbols_by_name_end() [2/2]

const_symbol_name_iterator gtirb::Module::symbols_by_name_end ( ) const
inline

Return a constant iterator to the element following the last Symbol, ordered by name.

◆ symbols_end() [1/2]

symbol_iterator gtirb::Module::symbols_end ( )
inline

Return an iterator to the element following the last Symbol.

◆ symbols_end() [2/2]

const_symbol_iterator gtirb::Module::symbols_end ( ) const
inline

Return a constant iterator to the element following the last Symbol.

Friends And Related Function Documentation

◆ Context

friend class Context
friend

◆ IR

friend class IR
friend

◆ SerializationTestHarness

friend class SerializationTestHarness
friend

◆ toProtobuf

template<typename T >
T::MessageType toProtobuf ( const T &  )
friend

The documentation for this class was generated from the following file: