|
GTIRB
v2.3.2
GrammaTech Intermediate Representation for Binaries: C++ API
|
Go to the documentation of this file.
15 #ifndef GTIRB_MODULE_H
16 #define GTIRB_MODULE_H
28 #include <gtirb/proto/Module.pb.h>
30 #include <boost/icl/interval_map.hpp>
31 #include <boost/iterator/indirect_iterator.hpp>
32 #include <boost/iterator/iterator_traits.hpp>
33 #include <boost/iterator/transform_iterator.hpp>
34 #include <boost/multi_index/hashed_index.hpp>
35 #include <boost/multi_index/key_extractors.hpp>
36 #include <boost/multi_index/mem_fun.hpp>
37 #include <boost/multi_index/ordered_index.hpp>
38 #include <boost/multi_index_container.hpp>
39 #include <boost/range/iterator_range.hpp>
53 template <
class T>
class ErrorOr;
75 enum class ISA : uint8_t {
101 Big = proto::BigEndian,
103 Little = proto::LittleEndian,
110 struct by_address {};
112 struct by_pointer {};
113 struct by_referent {};
116 static const Node* get_symbol_referent(
const Symbol&
S) {
117 if (std::optional<const Node*> Res =
118 S.visit([](
const Node* N) { return N; })) {
124 using ProxyBlockSet = std::unordered_set<ProxyBlock*>;
126 using SectionSet = boost::multi_index::multi_index_container<
127 Section*, boost::multi_index::indexed_by<
128 boost::multi_index::ordered_non_unique<
129 boost::multi_index::tag<by_address>,
130 boost::multi_index::identity<Section*>, AddressLess>,
131 boost::multi_index::ordered_non_unique<
132 boost::multi_index::tag<by_name>,
133 boost::multi_index::const_mem_fun<
135 boost::multi_index::hashed_unique<
136 boost::multi_index::tag<by_pointer>,
137 boost::multi_index::identity<Section*>>>>;
138 using SectionIntMap =
139 boost::icl::interval_map<Addr, std::set<Section*, AddressLess>>;
141 using SymbolSet = boost::multi_index::multi_index_container<
143 boost::multi_index::indexed_by<
144 boost::multi_index::ordered_non_unique<
145 boost::multi_index::tag<by_address>,
146 boost::multi_index::const_mem_fun<Symbol, std::optional<Addr>,
148 boost::multi_index::ordered_non_unique<
149 boost::multi_index::tag<by_name>,
150 boost::multi_index::const_mem_fun<
Symbol,
const std::string&,
152 boost::multi_index::hashed_unique<
153 boost::multi_index::tag<by_pointer>,
154 boost::multi_index::identity<Symbol*>>,
155 boost::multi_index::hashed_non_unique<
156 boost::multi_index::tag<by_referent>,
157 boost::multi_index::global_fun<
const Symbol&,
const Node*,
158 &get_symbol_referent>>>>;
160 class SectionObserverImpl;
161 class SymbolObserverImpl;
285 using proxy_block_iterator =
286 boost::indirect_iterator<ProxyBlockSet::iterator>;
291 boost::indirect_iterator<ProxyBlockSet::const_iterator, const ProxyBlock>;
294 boost::iterator_range<const_proxy_block_iterator>;
315 return boost::make_iterator_range(proxy_blocks_begin(), proxy_blocks_end());
319 return boost::make_iterator_range(proxy_blocks_begin(), proxy_blocks_end());
348 template <
typename... Args>
351 [[maybe_unused]]
ChangeStatus status = addProxyBlock(PB);
356 "unexpected result when inserting ProxyBlock");
369 using symbol_iterator =
370 boost::indirect_iterator<SymbolSet::index<by_pointer>::type::iterator>;
379 SymbolSet::index<by_pointer>::type::const_iterator,
const Symbol>;
390 boost::indirect_iterator<SymbolSet::index<by_name>::type::iterator>;
401 boost::indirect_iterator<SymbolSet::index<by_name>::type::const_iterator,
408 boost::iterator_range<const_symbol_name_iterator>;
415 boost::indirect_iterator<SymbolSet::index<by_address>::type::iterator>;
426 SymbolSet::index<by_address>::type::const_iterator,
const Symbol>;
432 boost::iterator_range<const_symbol_addr_iterator>;
438 boost::indirect_iterator<SymbolSet::index<by_referent>::type::iterator>;
447 SymbolSet::index<by_referent>::type::const_iterator,
const Symbol>;
452 boost::iterator_range<const_symbol_ref_iterator>;
473 return boost::make_iterator_range(symbols_begin(), symbols_end());
477 return boost::make_iterator_range(symbols_begin(), symbols_end());
500 return boost::make_iterator_range(symbols_by_name_begin(),
501 symbols_by_name_end());
506 return boost::make_iterator_range(symbols_by_name_begin(),
507 symbols_by_name_end());
530 return boost::make_iterator_range(symbols_by_addr_begin(),
531 symbols_by_addr_end());
536 return boost::make_iterator_range(symbols_by_addr_begin(),
537 symbols_by_addr_end());
548 auto& Index = Symbols.get<by_pointer>();
549 if (
auto Iter = Index.find(
S); Iter != Index.end()) {
551 S->setParent(
nullptr,
nullptr);
561 if (
S->getModule()) {
562 S->getModule()->removeSymbol(
S);
565 S->setParent(
this, SymObs.get());
585 auto Found = Symbols.get<by_name>().equal_range(N);
586 return boost::make_iterator_range(Found.first, Found.second);
596 auto Found = Symbols.get<by_name>().equal_range(N);
597 return boost::make_iterator_range(Found.first, Found.second);
607 auto Found = Symbols.get<by_address>().equal_range(X);
608 return boost::make_iterator_range(Found.first, Found.second);
618 auto Found = Symbols.get<by_address>().equal_range(X);
619 return boost::make_iterator_range(Found.first, Found.second);
630 auto& Index = Symbols.get<by_address>();
631 return boost::make_iterator_range(Index.lower_bound(Lower),
632 Index.lower_bound(Upper));
643 auto& Index = Symbols.get<by_address>();
644 return boost::make_iterator_range(Index.lower_bound(Lower),
645 Index.lower_bound(Upper));
655 return Symbols.get<by_referent>().equal_range(&Referent);
665 return Symbols.get<by_referent>().equal_range(&Referent);
674 const std::string&
getName()
const {
return Name; }
677 void setName(
const std::string& X);
688 boost::indirect_iterator<SectionIntMap::codomain_type::iterator>>;
694 boost::indirect_iterator<SectionSet::index<by_name>::type::iterator>;
706 boost::indirect_iterator<SectionSet::const_iterator, const Section&>;
715 SectionIntMap::codomain_type::const_iterator,
const Section&>>;
721 boost::indirect_iterator<SectionSet::index<by_name>::type::const_iterator,
728 boost::iterator_range<const_section_name_iterator>;
736 return Sections.get<by_name>().begin();
740 return Sections.get<by_name>().begin();
749 return Sections.get<by_name>().end();
754 return Sections.get<by_name>().end();
758 return boost::make_iterator_range(sections_begin(), sections_end());
762 return boost::make_iterator_range(sections_begin(), sections_end());
792 Section*
S = Section::Create(C, std::forward<Args>(A)...);
797 "unexpected result when inserting Section");
807 if (
auto It = SectionAddrs.find(X); It != SectionAddrs.end()) {
808 return boost::make_iterator_range(It->second.begin(), It->second.end());
819 if (
auto It = SectionAddrs.find(X); It != SectionAddrs.end()) {
820 return boost::make_iterator_range(It->second.begin(), It->second.end());
831 auto Pair = Sections.get<by_address>().equal_range(A);
843 auto& Index = Sections.get<by_address>();
844 return boost::make_iterator_range(
855 auto Pair = Sections.get<by_address>().equal_range(A);
867 auto& Index = Sections.get<by_address>();
868 return boost::make_iterator_range(
880 auto Pair = Sections.get<by_name>().equal_range(X);
891 auto Pair = Sections.get<by_name>().equal_range(X);
903 using byte_interval_iterator =
904 MergeSortedIterator<Section::byte_interval_iterator, AddressLess>;
909 Section::byte_interval_subrange::iterator, AddressLess>>;
912 MergeSortedIterator<Section::const_byte_interval_iterator, AddressLess>;
915 boost::iterator_range<const_byte_interval_iterator>;
918 boost::iterator_range<MergeSortedIterator<
919 Section::const_byte_interval_subrange::iterator, AddressLess>>;
924 boost::make_transform_iterator(this->sections_begin(),
925 NodeToByteIntervalRange<Section>()),
926 boost::make_transform_iterator(this->sections_end(),
927 NodeToByteIntervalRange<Section>()));
938 return boost::make_iterator_range(byte_intervals_begin(),
939 byte_intervals_end());
945 boost::make_transform_iterator(
946 this->sections_begin(), NodeToByteIntervalRange<const Section>()),
947 boost::make_transform_iterator(
948 this->sections_end(), NodeToByteIntervalRange<const Section>()));
959 return boost::make_iterator_range(byte_intervals_begin(),
960 byte_intervals_end());
972 byte_interval_subrange::iterator(
973 boost::make_transform_iterator(Range.begin(),
974 FindByteIntervalsIn<Section>(A)),
975 boost::make_transform_iterator(Range.end(),
976 FindByteIntervalsIn<Section>(A))),
977 byte_interval_subrange::iterator());
989 const_byte_interval_subrange::iterator(
990 boost::make_transform_iterator(
991 Range.begin(), FindByteIntervalsIn<const Section>(A)),
992 boost::make_transform_iterator(
993 Range.end(), FindByteIntervalsIn<const Section>(A))),
994 const_byte_interval_subrange::iterator());
1005 byte_interval_range::iterator(
1006 boost::make_transform_iterator(Range.begin(),
1007 FindByteIntervalsAt<Section>(A)),
1008 boost::make_transform_iterator(Range.end(),
1009 FindByteIntervalsAt<Section>(A))),
1010 byte_interval_range::iterator());
1021 std::vector<Section::byte_interval_range> Ranges;
1022 for (
Section&
S : findSectionsOn(Low))
1023 Ranges.push_back(
S.findByteIntervalsAt(Low, High));
1024 for (
Section&
S : findSectionsAt(Low + 1, High))
1025 Ranges.push_back(
S.findByteIntervalsAt(Low, High));
1038 const_byte_interval_range::iterator(
1039 boost::make_transform_iterator(
1040 Range.begin(), FindByteIntervalsAt<const Section>(A)),
1041 boost::make_transform_iterator(
1042 Range.end(), FindByteIntervalsAt<const Section>(A))),
1043 const_byte_interval_range::iterator());
1054 std::vector<Section::const_byte_interval_range> Ranges;
1055 for (
const Section&
S : findSectionsOn(Low))
1056 Ranges.push_back(
S.findByteIntervalsAt(Low, High));
1057 for (
const Section&
S : findSectionsAt(Low + 1, High))
1058 Ranges.push_back(
S.findByteIntervalsAt(Low, High));
1073 MergeSortedIterator<Section::block_iterator, BlockAddressLess>;
1084 MergeSortedIterator<Section::block_subrange::iterator, BlockAddressLess>>;
1090 MergeSortedIterator<Section::const_block_iterator, BlockAddressLess>;
1100 Section::const_block_subrange::iterator, BlockAddressLess>>;
1105 boost::make_transform_iterator(this->sections_begin(),
1106 NodeToBlockRange<Section>()),
1107 boost::make_transform_iterator(this->sections_end(),
1108 NodeToBlockRange<Section>()));
1116 return boost::make_iterator_range(blocks_begin(), blocks_end());
1122 boost::make_transform_iterator(this->sections_begin(),
1123 NodeToBlockRange<const Section>()),
1124 boost::make_transform_iterator(this->sections_end(),
1125 NodeToBlockRange<const Section>()));
1133 return boost::make_iterator_range(blocks_begin(), blocks_end());
1146 block_subrange::iterator(
1147 boost::make_transform_iterator(SectionRange.begin(),
1148 FindBlocksIn<Section>(A)),
1149 boost::make_transform_iterator(SectionRange.end(),
1150 FindBlocksIn<Section>(A))),
1151 block_subrange::iterator());
1164 const_block_subrange::iterator(
1165 boost::make_transform_iterator(SectionRange.begin(),
1166 FindBlocksIn<const Section>(A)),
1167 boost::make_transform_iterator(SectionRange.end(),
1168 FindBlocksIn<const Section>(A))),
1169 const_block_subrange::iterator());
1181 boost::make_transform_iterator(
1182 SectionRange.begin(), FindBlocksAt<Section>(A)),
1183 boost::make_transform_iterator(
1184 SectionRange.end(), FindBlocksAt<Section>(A))),
1185 block_range::iterator());
1196 std::vector<Section::block_range> Ranges;
1197 for (
Section&
S : findSectionsOn(Low))
1198 Ranges.push_back(
S.findBlocksAt(Low, High));
1199 for (
Section&
S : findSectionsAt(Low + 1, High))
1200 Ranges.push_back(
S.findBlocksAt(Low, High));
1213 const_block_range::iterator(
1214 boost::make_transform_iterator(SectionRange.begin(),
1215 FindBlocksAt<const Section>(A)),
1216 boost::make_transform_iterator(SectionRange.end(),
1217 FindBlocksAt<const Section>(A))),
1218 const_block_range::iterator());
1229 std::vector<Section::const_block_range> Ranges;
1230 for (
const Section&
S : findSectionsOn(Low))
1231 Ranges.push_back(
S.findBlocksAt(Low, High));
1232 for (
const Section&
S : findSectionsAt(Low + 1, High))
1233 Ranges.push_back(
S.findBlocksAt(Low, High));
1247 using code_block_iterator =
1248 MergeSortedIterator<Section::code_block_iterator, AddressLess>;
1260 MergeSortedIterator<Section::code_block_subrange::iterator, AddressLess>>;
1266 MergeSortedIterator<Section::const_code_block_iterator, AddressLess>;
1272 boost::iterator_range<const_code_block_iterator>;
1279 Section::const_code_block_subrange::iterator, AddressLess>>;
1283 SectionSet::iterator End) {
1284 NodeToCodeBlockRange<Section> Transformer;
1285 return boost::make_iterator_range(
1297 boost::make_transform_iterator(this->sections_begin(),
1298 NodeToCodeBlockRange<Section>()),
1299 boost::make_transform_iterator(this->sections_end(),
1300 NodeToCodeBlockRange<Section>()));
1309 return boost::make_iterator_range(code_blocks_begin(), code_blocks_end());
1315 boost::make_transform_iterator(this->sections_begin(),
1316 NodeToCodeBlockRange<const Section>()),
1317 boost::make_transform_iterator(this->sections_end(),
1318 NodeToCodeBlockRange<const Section>()));
1329 return boost::make_iterator_range(code_blocks_begin(), code_blocks_end());
1341 code_block_subrange::iterator(
1342 boost::make_transform_iterator(Range.begin(),
1343 FindCodeBlocksIn<Section>(A)),
1344 boost::make_transform_iterator(Range.end(),
1345 FindCodeBlocksIn<Section>(A))),
1346 code_block_subrange::iterator());
1358 const_code_block_subrange::iterator(
1359 boost::make_transform_iterator(Range.begin(),
1360 FindCodeBlocksIn<const Section>(A)),
1361 boost::make_transform_iterator(Range.end(),
1362 FindCodeBlocksIn<const Section>(A))),
1363 const_code_block_subrange::iterator());
1374 code_block_range::iterator(
1375 boost::make_transform_iterator(Range.begin(),
1376 FindCodeBlocksAt<Section>(A)),
1377 boost::make_transform_iterator(Range.end(),
1378 FindCodeBlocksAt<Section>(A))),
1379 code_block_range::iterator());
1389 std::vector<Section::code_block_range> Ranges;
1390 for (
Section&
S : findSectionsOn(Low))
1391 Ranges.push_back(
S.findCodeBlocksAt(Low, High));
1392 for (
Section&
S : findSectionsAt(Low + 1, High))
1393 Ranges.push_back(
S.findCodeBlocksAt(Low, High));
1405 const_code_block_range::iterator(
1406 boost::make_transform_iterator(Range.begin(),
1407 FindCodeBlocksAt<const Section>(A)),
1408 boost::make_transform_iterator(Range.end(),
1409 FindCodeBlocksAt<const Section>(A))),
1410 const_code_block_range::iterator());
1420 std::vector<Section::const_code_block_range> Ranges;
1421 for (
const Section&
S : findSectionsOn(Low))
1422 Ranges.push_back(
S.findCodeBlocksAt(Low, High));
1423 for (
const Section&
S : findSectionsAt(Low + 1, High))
1424 Ranges.push_back(
S.findCodeBlocksAt(Low, High));
1438 using data_block_iterator =
1439 MergeSortedIterator<Section::data_block_iterator, AddressLess>;
1451 MergeSortedIterator<Section::data_block_subrange::iterator, AddressLess>>;
1457 MergeSortedIterator<Section::const_data_block_iterator, AddressLess>;
1463 boost::iterator_range<const_data_block_iterator>;
1470 Section::const_data_block_subrange::iterator, AddressLess>>;
1475 boost::make_transform_iterator(this->sections_begin(),
1476 NodeToDataBlockRange<Section>()),
1477 boost::make_transform_iterator(this->sections_end(),
1478 NodeToDataBlockRange<Section>()));
1487 return boost::make_iterator_range(data_blocks_begin(), data_blocks_end());
1493 boost::make_transform_iterator(this->sections_begin(),
1494 NodeToDataBlockRange<const Section>()),
1495 boost::make_transform_iterator(this->sections_end(),
1496 NodeToDataBlockRange<const Section>()));
1507 return boost::make_iterator_range(data_blocks_begin(), data_blocks_end());
1519 data_block_subrange::iterator(
1520 boost::make_transform_iterator(Range.begin(),
1521 FindDataBlocksIn<Section>(A)),
1522 boost::make_transform_iterator(Range.end(),
1523 FindDataBlocksIn<Section>(A))),
1524 data_block_subrange::iterator());
1536 const_data_block_subrange::iterator(
1537 boost::make_transform_iterator(Range.begin(),
1538 FindDataBlocksIn<const Section>(A)),
1539 boost::make_transform_iterator(Range.end(),
1540 FindDataBlocksIn<const Section>(A))),
1541 const_data_block_subrange::iterator());
1552 data_block_range::iterator(
1553 boost::make_transform_iterator(Range.begin(),
1554 FindDataBlocksAt<Section>(A)),
1555 boost::make_transform_iterator(Range.end(),
1556 FindDataBlocksAt<Section>(A))),
1557 data_block_range::iterator());
1567 std::vector<Section::data_block_range> Ranges;
1568 for (
Section&
S : findSectionsOn(Low))
1569 Ranges.push_back(
S.findDataBlocksAt(Low, High));
1570 for (
Section&
S : findSectionsAt(Low + 1, High))
1571 Ranges.push_back(
S.findDataBlocksAt(Low, High));
1583 const_data_block_range::iterator(
1584 boost::make_transform_iterator(Range.begin(),
1585 FindDataBlocksAt<const Section>(A)),
1586 boost::make_transform_iterator(Range.end(),
1587 FindDataBlocksAt<const Section>(A))),
1588 const_data_block_range::iterator());
1598 std::vector<Section::const_data_block_range> Ranges;
1599 for (
const Section&
S : findSectionsOn(Low))
1600 Ranges.push_back(
S.findDataBlocksAt(Low, High));
1601 for (
const Section&
S : findSectionsAt(Low + 1, High))
1602 Ranges.push_back(
S.findDataBlocksAt(Low, High));
1615 using symbolic_expression_iterator =
1622 boost::iterator_range<symbolic_expression_iterator>;
1633 boost::iterator_range<const_symbolic_expression_iterator>;
1638 boost::make_transform_iterator(
1639 this->sections_begin(), NodeToSymbolicExpressionRange<Section>()),
1640 boost::make_transform_iterator(
1641 this->sections_end(), NodeToSymbolicExpressionRange<Section>()));
1652 return boost::make_iterator_range(symbolic_expressions_begin(),
1653 symbolic_expressions_end());
1659 boost::make_transform_iterator(
1660 this->sections_begin(),
1661 NodeToSymbolicExpressionRange<const Section>()),
1662 boost::make_transform_iterator(
1663 this->sections_end(),
1664 NodeToSymbolicExpressionRange<const Section>()));
1675 return boost::make_iterator_range(symbolic_expressions_begin(),
1676 symbolic_expressions_end());
1687 symbolic_expression_range::iterator(
1688 boost::make_transform_iterator(this->sections_begin(),
1689 FindSymExprsAt<Section>(A)),
1690 boost::make_transform_iterator(this->sections_end(),
1691 FindSymExprsAt<Section>(A))),
1692 symbolic_expression_range::iterator());
1705 symbolic_expression_range::iterator(
1706 boost::make_transform_iterator(
1707 this->sections_begin(),
1708 FindSymExprsBetween<Section>(Low, High)),
1709 boost::make_transform_iterator(
1710 this->sections_end(), FindSymExprsBetween<Section>(Low, High))),
1711 symbolic_expression_range::iterator());
1722 const_symbolic_expression_range::iterator(
1723 boost::make_transform_iterator(this->sections_begin(),
1724 FindSymExprsAt<const Section>(A)),
1725 boost::make_transform_iterator(this->sections_end(),
1726 FindSymExprsAt<const Section>(A))),
1727 const_symbolic_expression_range::iterator());
1741 const_symbolic_expression_range::iterator(
1742 boost::make_transform_iterator(
1743 this->sections_begin(),
1744 FindSymExprsBetween<const Section>(Low, High)),
1745 boost::make_transform_iterator(
1746 this->sections_end(),
1747 FindSymExprsBetween<const Section>(Low, High))),
1748 const_symbolic_expression_range::iterator());
1754 static bool classof(
const Node* N) {
return N->getKind() == Kind::Module; }
1759 using MessageType = proto::Module;
1762 void removeSectionAddrs(Section* S);
1768 void insertSectionAddrs(Section* S);
1775 void toProtobuf(MessageType* Message)
const;
1783 static ErrorOr<Module*> fromProtobuf(Context& C,
const MessageType& Message);
1786 void save(std::ostream& Out)
const;
1789 static Module* load(Context& C, std::istream& In);
1791 void setParent(IR* I, ModuleObserver* O) {
1796 IR* Parent{
nullptr};
1797 ModuleObserver* Observer{
nullptr};
1798 std::string BinaryPath;
1800 int64_t RebaseDelta{0};
1805 CodeBlock* EntryPoint{
nullptr};
1806 ProxyBlockSet ProxyBlocks;
1807 SectionSet Sections;
1808 SectionIntMap SectionAddrs;
1811 std::unique_ptr<SectionObserver> SecObs;
1812 std::unique_ptr<SymbolObserver> SymObs;
1817 template <
typename T>
friend typename T::MessageType toProtobuf(
const T&);
1818 friend class SerializationTestHarness;
1838 const std::string& NewName) = 0;
1879 std::string OldName = X;
1880 std::swap(Name, OldName);
1886 "recovering from rejected name change is unimplemented");
1893 #endif // GTIRB_MODULE_H
Section * addSection(Context &C, Args &&... A)
Creates a new Section in this module.
Definition: Module.hpp:791
const_byte_interval_range findByteIntervalsAt(Addr Low, Addr High) const
Find all the intervals that start between a range of addresses.
Definition: Module.hpp:1053
boost::indirect_iterator< SymbolSet::index< by_address >::type::const_iterator, const Symbol > const_symbol_addr_iterator
Constant iterator over symbols (Symbol).
Definition: Module.hpp:426
const std::string & getName() const
Get the module name.
Definition: Module.hpp:674
const std::string & getName() const
Get the name of a Section.
Definition: Section.hpp:122
gtirb::FileFormat getFileFormat() const
Get the format of the binary pointed to by getBinaryPath().
Definition: Module.hpp:209
const_proxy_block_iterator proxy_blocks_begin() const
Return a constant iterator to the first ProxyBlock.
Definition: Module.hpp:301
const_section_range sections() const
Return a constant range of the sections (Section).
Definition: Module.hpp:761
boost::indirect_iterator< SymbolSet::index< by_name >::type::const_iterator, const Symbol > const_symbol_name_iterator
Constant iterator over symbols (Symbol).
Definition: Module.hpp:402
const_block_iterator blocks_begin() const
Return an iterator to the first block.
Definition: Module.hpp:1120
A basic block.
Definition: CodeBlock.hpp:47
boost::indirect_iterator< ProxyBlockSet::const_iterator, const ProxyBlock > const_proxy_block_iterator
Constant iterator over proxy_blocks (ProxyBlock).
Definition: Module.hpp:291
NodeTy * Create(Args &&... TheArgs)
Create an object of type T.
Definition: Context.hpp:127
code_block_iterator code_blocks_begin()
Return an iterator to the first CodeBlock.
Definition: Module.hpp:1295
const_symbol_ref_range findSymbols(const Node &Referent) const
Find symbols by their referent object.
Definition: Module.hpp:664
Symbol * addSymbol(Symbol *S)
Move a Symbol object to be located in this module.
Definition: Module.hpp:560
Represents the base of the Node class hierarchy.
Definition: Node.hpp:39
const_symbol_addr_range findSymbols(Addr X) const
Find symbols by address.
Definition: Module.hpp:617
section_name_iterator sections_by_name_end()
Return an iterator to the element following the last Section.
Definition: Module.hpp:748
section_subrange findSectionsOn(Addr X)
Find a Section containing an address.
Definition: Module.hpp:806
boost::indirect_iterator< SymbolSet::index< by_referent >::type::iterator > symbol_ref_iterator
Iterator over symbols (Symbol).
Definition: Module.hpp:438
boost::indirect_iterator< SectionSet::index< by_name >::type::const_iterator, const Section & > const_section_name_iterator
Constant iterator over sections (Section).
Definition: Module.hpp:722
MergeSortedIterator< Section::symbolic_expression_iterator, ByteInterval::SymbolicExpressionElement::AddressLess > symbolic_expression_iterator
Iterator over SymbolicExpressionElement objects.
Definition: Module.hpp:1617
const_symbolic_expression_range symbolic_expressions() const
Return a range of all the SymbolicExpression objects.
Definition: Module.hpp:1674
byte_interval_iterator byte_intervals_begin()
Return an iterator to the first ByteInterval.
Definition: Module.hpp:922
code_block_range findCodeBlocksAt(Addr Low, Addr High)
Find all the code blocks that start between a range of addresses.
Definition: Module.hpp:1388
MergeSortedIterator< Section::const_byte_interval_iterator, AddressLess > const_byte_interval_iterator
Const iterator over ByteInterval objects.
Definition: Module.hpp:912
boost::uuids::uuid UUID
Represents a universally unique identifier used to identify Node objects across serialization boundar...
Definition: Context.hpp:37
const_symbolic_expression_iterator symbolic_expressions_end() const
Return an iterator to the element following the last SymbolicExpression.
Definition: Module.hpp:1669
boost::indirect_iterator< SymbolSet::index< by_referent >::type::const_iterator, const Symbol > const_symbol_ref_iterator
Constant iterator over symbols (Symbol).
Definition: Module.hpp:447
Symbol * addSymbol(Context &C, Args... A)
Creates a new Symbol in this module.
Definition: Module.hpp:574
boost::iterator_range< const_section_iterator > const_section_range
Constant range of sections (Section).
Definition: Module.hpp:712
boost::iterator_range< const_byte_interval_iterator > const_byte_interval_range
Const range of ByteInterval objects.
Definition: Module.hpp:915
A special class to store an Effective Address.
Definition: Addr.hpp:37
CodeBlock * getEntryPoint()
Get the entry point of this module, or null if not present.
Definition: Module.hpp:274
boost::iterator_range< section_iterator > section_range
Range of sections (Section).
Definition: Module.hpp:685
symbol_addr_iterator symbols_by_addr_end()
Return an iterator to the element following the last Symbol, ordered by address.
Definition: Module.hpp:520
const_code_block_range findCodeBlocksAt(Addr Low, Addr High) const
Find all the code blocks that start between a range of addresses.
Definition: Module.hpp:1419
cfg_node_cast_iter< const CodeBlock > const_block_iterator
Constant iterator over blocks (Block).
Definition: CFG.hpp:198
symbol_range symbols()
Return a range of the symbols (Symbol).
Definition: Module.hpp:472
@ RISCV32
Reduced Instruction Set Computer V, 32-bit.
section_range findSectionsAt(Addr A)
Find all the sections that start at an address.
Definition: Module.hpp:830
code_block_iterator code_blocks_end()
Return an iterator to the element following the last CodeBlock.
Definition: Module.hpp:1305
boost::iterator_range< byte_interval_iterator > byte_interval_range
Range of ByteInterval objects.
Definition: Module.hpp:906
The context under which GTIRB operations occur.
Definition: Context.hpp:64
byte_interval_range findByteIntervalsAt(Addr A)
Find all the intervals that start at an address.
Definition: Module.hpp:1002
void setName(const std::string &X)
Set the module name.
Definition: Module.hpp:1877
void setRebaseDelta(int64_t X)
Set the difference between this module's preferred address and the address where it was actually load...
Definition: Module.hpp:218
const CodeBlock * getEntryPoint() const
Get the entry point of this module, or null if not present.
Definition: Module.hpp:272
MergeSortedIterator< ByteInterval::const_symbolic_expression_iterator, ByteInterval::ConstSymbolicExpressionElement::AddressLess > const_symbolic_expression_iterator
Iterator over SymbolicExpressionElement objects.
Definition: Section.hpp:919
const_section_subrange findSectionsOn(Addr X) const
Find a Section containing an address.
Definition: Module.hpp:818
boost::indirect_iterator< SymbolSet::index< by_pointer >::type::const_iterator, const Symbol > const_symbol_iterator
Constant iterator over symbols (Symbol).
Definition: Module.hpp:379
const_symbol_iterator symbols_end() const
Return a constant iterator to the element following the last Symbol.
Definition: Module.hpp:468
void setISA(gtirb::ISA X)
Set the ISA of the instructions in this Module.
Definition: Module.hpp:254
boost::iterator_range< MergeSortedIterator< Section::byte_interval_subrange::iterator, AddressLess > > byte_interval_subrange
Sub-range of ByteInterval objects overlapping addresses.
Definition: Module.hpp:909
boost::iterator_range< code_block_iterator > code_block_range
Range of CodeBlock objects.
Definition: Module.hpp:1253
const_byte_interval_range findByteIntervalsAt(Addr A) const
Find all the intervals that start at an address.
Definition: Module.hpp:1035
Represents a named section of the binary.
Definition: Section.hpp:66
boost::iterator_range< section_name_iterator > section_name_range
Range of sections (Section).
Definition: Module.hpp:699
const_block_subrange findBlocksOn(Addr A) const
Find all the blocks that have bytes that lie within the address specified.
Definition: Module.hpp:1161
boost::iterator_range< const_symbolic_expression_iterator > const_symbolic_expression_range
Range of SymbolicExpressionElement objects.
Definition: Module.hpp:1633
std::optional< Addr > getAddress() const
Get the effective address.
const_byte_interval_subrange findByteIntervalsOn(Addr A) const
Find all the intervals that contain the address specified.
Definition: Module.hpp:986
byte_interval_range byte_intervals()
Return a range of all the ByteInterval objects.
Definition: Module.hpp:937
boost::iterator_range< const_symbol_addr_iterator > const_symbol_addr_range
Constant range of symbols (Symbol).
Definition: Module.hpp:432
symbol_iterator symbols_begin()
Return an iterator to the first Symbol.
Definition: Module.hpp:455
boost::indirect_iterator< SectionSet::iterator > section_iterator
Iterator over sections (Section).
Definition: Module.hpp:683
byte_interval_subrange findByteIntervalsOn(Addr A)
Find all the intervals that contain the address specified.
Definition: Module.hpp:969
boost::indirect_iterator< SymbolSet::index< by_address >::type::iterator > symbol_addr_iterator
Iterator over symbols (Symbol).
Definition: Module.hpp:415
boost::iterator_range< MergeSortedIterator< Section::data_block_subrange::iterator, AddressLess > > data_block_subrange
Sub-range of DataBlock objects overlapping an address or range of addreses.
Definition: Module.hpp:1451
data_block_range data_blocks()
Return a range of all the DataBlock objects.
Definition: Module.hpp:1486
const_symbol_name_iterator symbols_by_name_end() const
Return a constant iterator to the element following the last Symbol, ordered by name.
Definition: Module.hpp:495
boost::indirect_iterator< SymbolSet::index< by_name >::type::iterator > symbol_name_iterator
Iterator over symbols (Symbol).
Definition: Module.hpp:390
MergeSortedIterator< Section::const_symbolic_expression_iterator, ByteInterval::ConstSymbolicExpressionElement::AddressLess > const_symbolic_expression_iterator
Iterator over SymbolicExpressionElement objects.
Definition: Module.hpp:1628
MergeSortedIterator< Section::const_code_block_iterator, AddressLess > const_code_block_iterator
Iterator over CodeBlock objects.
Definition: Module.hpp:1266
@ IdaProDb32
IDA Pro database file.
const_symbol_name_range findSymbols(const std::string &N) const
Find symbols by name.
Definition: Module.hpp:595
symbol_addr_range symbols_by_addr()
Return a range of the symbols (Symbol), ordered by address.
Definition: Module.hpp:529
code_block_range findCodeBlocksAt(Addr A)
Find all the code blocks that start at an address.
Definition: Module.hpp:1371
block_iterator blocks_begin()
Return an iterator to the first block.
Definition: Module.hpp:1103
#define GTIRB_EXPORT_API
This macro controls the visibility of exported symbols (i.e. classes) in shared libraries....
Definition: Export.hpp:52
boost::iterator_range< symbolic_expression_iterator > symbolic_expression_range
Range of SymbolicExpressionElement objects.
Definition: Module.hpp:1622
int64_t getRebaseDelta() const
Get the difference between this module's preferred address and the address where it was actually load...
Definition: Module.hpp:225
boost::iterator_range< symbol_addr_iterator > symbol_addr_range
Range of symbols (Symbol).
Definition: Module.hpp:420
symbolic_expression_iterator symbolic_expressions_end()
Return an iterator to the element following the last SymbolicExpression.
Definition: Module.hpp:1646
const_proxy_block_range proxy_blocks() const
Return a constant range of the proxy_blocks (ProxyBlock).
Definition: Module.hpp:318
Main namespace for the GTIRB API.
Definition: Addr.hpp:28
proxy_block_iterator proxy_blocks_end()
Return an iterator to the element following the last ProxyBlock.
Definition: Module.hpp:305
boost::iterator_range< block_iterator > block_range
Range of blocks.
Definition: Module.hpp:1078
void setPreferredAddr(gtirb::Addr X)
Set the preferred address for loading this module.
Definition: Module.hpp:233
section_name_range findSections(const std::string &X)
Find a Section by name.
Definition: Module.hpp:879
@ RAW
Raw binary file (no format)
const_data_block_iterator data_blocks_begin() const
Return an iterator to the first DataBlock.
Definition: Module.hpp:1491
static Symbol * Create(Context &C)
Create an unitialized Symbol object.
Definition: Symbol.hpp:221
const_byte_interval_iterator byte_intervals_begin() const
Return an iterator to the first ByteInterval.
Definition: Module.hpp:943
boost::iterator_range< boost::indirect_iterator< SectionIntMap::codomain_type::iterator > > section_subrange
Sub-range of sections overlapping an address (Section).
Definition: Module.hpp:688
proxy_block_range proxy_blocks()
Return a range of the proxy_blocks (ProxyBlock).
Definition: Module.hpp:314
boost::iterator_range< const_block_iterator > const_block_range
Range of blocks.
Definition: Module.hpp:1095
symbol_addr_range findSymbols(Addr Lower, Addr Upper)
Find symbols by a range of addresses.
Definition: Module.hpp:629
@ COFF
Common Object File Format (COFF)
data_block_range findDataBlocksAt(Addr Low, Addr High)
Find all the data blocks that start between a range of addresses.
Definition: Module.hpp:1566
boost::iterator_range< const_section_name_iterator > const_section_name_range
Constant range of sections (Section).
Definition: Module.hpp:728
MergeSortedIterator< Section::byte_interval_iterator, AddressLess > byte_interval_iterator
Iterator over ByteInterval objects.
Definition: Module.hpp:904
symbolic_expression_range symbolic_expressions()
Return a range of all the SymbolicExpression objects.
Definition: Module.hpp:1651
block_range blocks()
Return a range of all the blocks.
Definition: Module.hpp:1115
A placeholder that serves as the endpoint (source or target) of a CFG edge.
Definition: ProxyBlock.hpp:49
cfg_node_cast_iter< CodeBlock > block_iterator
Iterator over blocks (Block).
Definition: CFG.hpp:194
boost::iterator_range< boost::indirect_iterator< SectionIntMap::codomain_type::const_iterator, const Section & > > const_section_subrange
Sub-range of sections overlapping an address (Section).
Definition: Module.hpp:715
const_data_block_range findDataBlocksAt(Addr A) const
Find all the data blocks that start at an address.
Definition: Module.hpp:1580
boost::iterator_range< MergeSortedIterator< Section::const_block_subrange::iterator, BlockAddressLess > > const_block_subrange
Sub-range of blocks overlapping an address or range of addreses.
Definition: Module.hpp:1100
A complete internal representation consisting of Modules (Module).
Definition: IR.hpp:76
const std::string & getName() const
Get the name.
Definition: Symbol.hpp:279
bool removeSymbol(Symbol *S)
Remove a Symbol object located in this module.
Definition: Module.hpp:547
symbol_ref_range findSymbols(const Node &Referent)
Find symbols by their referent object.
Definition: Module.hpp:654
A comparison function object to order symbolic expression elements by the address in which they occur...
Definition: ByteInterval.hpp:1138
static ProxyBlock * Create(Context &C)
Create an unitialized ProxyBlock object.
Definition: ProxyBlock.hpp:54
const_section_name_range findSections(const std::string &X) const
Find a Section by name.
Definition: Module.hpp:890
boost::indirect_iterator< ProxyBlockSet::iterator > proxy_block_iterator
Iterator over proxy_blocks (ProxyBlock).
Definition: Module.hpp:286
const_block_range findBlocksAt(Addr A) const
Find all the blocks that start at an address.
Definition: Module.hpp:1210
const IR * getIR() const
Get the IR this module belongs to.
Definition: Module.hpp:182
byte_interval_range findByteIntervalsAt(Addr Low, Addr High)
Find all the intervals that start between a range of addresses.
Definition: Module.hpp:1020
boost::indirect_iterator< SectionSet::const_iterator, const Section & > const_section_iterator
Constant iterator over sections (Section).
Definition: Module.hpp:706
void setBinaryPath(const std::string &X)
Set the location of the corresponding binary on disk.
Definition: Module.hpp:192
Class gtirb::AuxDataContainer.
section_range findSectionsAt(Addr Low, Addr High)
Find all the sections that start between a range of addresses.
Definition: Module.hpp:842
IR * getIR()
Get the IR this module belongs to.
Definition: Module.hpp:184
const_byte_interval_range byte_intervals() const
Return a range of all the ByteInterval objects.
Definition: Module.hpp:958
gtirb::ISA getISA() const
Get the ISA of the instructions in this Module.
Definition: Module.hpp:259
const_symbol_name_range symbols_by_name() const
Return a constant range of the symbols (Symbol), ordered by name.
Definition: Module.hpp:505
const_symbol_addr_range symbols_by_addr() const
Return a constant range of the symbols (Symbol), ordered by address.
Definition: Module.hpp:535
section_iterator sections_end()
Return an iterator to the element following the last Section.
Definition: Module.hpp:743
Interface for notifying observers when the Module is updated.
Definition: Module.hpp:1826
data_block_subrange findDataBlocksOn(Addr A)
Find all the data blocks that have bytes that lie within the address specified.
Definition: Module.hpp:1516
MergeSortedIterator< Section::code_block_iterator, AddressLess > code_block_iterator
Iterator over CodeBlock objects.
Definition: Module.hpp:1248
MergeSortedIterator< Section::data_block_iterator, AddressLess > data_block_iterator
Iterator over DataBlock objects.
Definition: Module.hpp:1439
static Module * Create(Context &C, const std::string &Name)
Create a Module object.
Definition: Module.hpp:177
const_section_name_iterator sections_by_name_begin() const
Return a constant iterator to the first Section.
Definition: Module.hpp:739
proxy_block_iterator proxy_blocks_begin()
Return an iterator to the first ProxyBlock.
Definition: Module.hpp:297
const_data_block_subrange findDataBlocksOn(Addr A) const
Find all the data blocks that have bytes that lie within the address specified.
Definition: Module.hpp:1533
boost::iterator_range< const_proxy_block_iterator > const_proxy_block_range
Constant range of proxy_blocks (ProxyBlock).
Definition: Module.hpp:294
MergeSortedIterator< Section::const_data_block_iterator, AddressLess > const_data_block_iterator
Iterator over DataBlock objects.
Definition: Module.hpp:1457
MergeSortedIterator< Section::block_iterator, BlockAddressLess > block_iterator
Iterator over blocks.
Definition: Module.hpp:1073
const_section_range findSectionsAt(Addr A) const
Find all the sections that start at an address.
Definition: Module.hpp:854
const_data_block_range data_blocks() const
Return a range of all the DataBlock objects.
Definition: Module.hpp:1506
symbol_name_range symbols_by_name()
Return a range of the symbols (Symbol), ordered by name.
Definition: Module.hpp:499
symbol_addr_range findSymbols(Addr X)
Find symbols by address.
Definition: Module.hpp:606
block_subrange findBlocksOn(Addr A)
Find all the blocks that have bytes that lie within the address specified.
Definition: Module.hpp:1143
byte_interval_iterator byte_intervals_end()
Return an iterator to the element following the last ByteInterval.
Definition: Module.hpp:932
const_code_block_iterator code_blocks_end() const
Return an iterator to the element following the last CodeBlock.
Definition: Module.hpp:1323
const_block_iterator blocks_end() const
Return an iterator to the element following the last block.
Definition: Module.hpp:1129
const_block_range findBlocksAt(Addr Low, Addr High) const
Find all the blocks that start between a range of addresses.
Definition: Module.hpp:1228
void setByteOrder(gtirb::ByteOrder X)
Set the endianness of the instructions in this Module.
Definition: Module.hpp:264
boost::iterator_range< const_symbol_name_iterator > const_symbol_name_range
Constant range of symbols (Symbol).
Definition: Module.hpp:408
const_symbol_addr_iterator symbols_by_addr_begin() const
Return a constant iterator to the first Symbol, ordered by address.
Definition: Module.hpp:515
block_range findBlocksAt(Addr A)
Find all the blocks that start at an address.
Definition: Module.hpp:1178
boost::iterator_range< const_code_block_iterator > const_code_block_range
Range of CodeBlock objects.
Definition: Module.hpp:1272
@ PE
Microsoft Portable Executable (PE) format.
const_section_iterator sections_end() const
Return a constant iterator to the element following the last Section.
Definition: Module.hpp:746
const_code_block_range findCodeBlocksAt(Addr A) const
Find all the code blocks that start at an address.
Definition: Module.hpp:1402
const_data_block_range findDataBlocksAt(Addr Low, Addr High) const
Find all the data blocks that start between a range of addresses.
Definition: Module.hpp:1597
boost::iterator_range< symbol_iterator > symbol_range
Range of symbols (Symbol).
Definition: Module.hpp:374
boost::iterator_range< const_symbol_iterator > const_symbol_range
Constant range of symbols (Symbol).
Definition: Module.hpp:383
const_section_range findSectionsAt(Addr Low, Addr High) const
Find all the sections that start between a range of addresses.
Definition: Module.hpp:866
boost::iterator_range< symbol_ref_iterator > symbol_ref_range
Range of symbols (Symbol).
Definition: Module.hpp:442
const std::string & getBinaryPath() const
Get the location of the corresponding binary on disk.
Definition: Module.hpp:197
virtual ChangeStatus nameChange(Module *M, const std::string &OldName, const std::string &NewName)=0
Notify the parent when this Module's name changes.
symbolic_expression_iterator symbolic_expressions_begin()
Return an iterator to the first SymbolicExpression.
Definition: Module.hpp:1636
section_iterator sections_begin()
Return an iterator to the first Section.
Definition: Module.hpp:731
const_section_name_iterator sections_by_name_end() const
Return a constant iterator to the element following the last Section.
Definition: Module.hpp:753
Contains the AuxData Tables and serves as a base class.
Definition: AuxDataContainer.hpp:56
const_symbolic_expression_iterator symbolic_expressions_begin() const
Return an iterator to the first SymbolicExpression.
Definition: Module.hpp:1657
const_byte_interval_iterator byte_intervals_end() const
Return an iterator to the element following the last ByteInterval.
Definition: Module.hpp:953
const_proxy_block_iterator proxy_blocks_end() const
Return a constant iterator to the element following the last ProxyBlock.
Definition: Module.hpp:310
gtirb::Addr getPreferredAddr() const
Get the preferred address for loading this module.
Definition: Module.hpp:239
boost::iterator_range< MergeSortedIterator< Section::block_subrange::iterator, BlockAddressLess > > block_subrange
Sub-range of blocks overlapping an address or range of addreses.
Definition: Module.hpp:1084
const_symbol_addr_iterator symbols_by_addr_end() const
Return a constant iterator to the element following the last Symbol, ordered by address.
Definition: Module.hpp:525
const_code_block_range code_blocks() const
Return a range of all the CodeBlock objects.
Definition: Module.hpp:1328
Represents a single binary (library or executable).
Definition: Module.hpp:109
symbol_iterator symbols_end()
Return an iterator to the element following the last Symbol.
Definition: Module.hpp:463
boost::iterator_range< MergeSortedIterator< Section::const_code_block_subrange::iterator, AddressLess > > const_code_block_subrange
Sub-range of CodeBlock objects overlapping an address or range of addreses.
Definition: Module.hpp:1279
boost::indirect_iterator< SectionSet::index< by_name >::type::iterator > section_name_iterator
Iterator over sections (Section).
Definition: Module.hpp:694
const_code_block_iterator code_blocks_begin() const
Return an iterator to the first CodeBlock.
Definition: Module.hpp:1313
boost::iterator_range< data_block_iterator > data_block_range
Range of DataBlock objects.
Definition: Module.hpp:1444
const_data_block_iterator data_blocks_end() const
Return an iterator to the element following the last DataBlock.
Definition: Module.hpp:1501
symbolic_expression_range findSymbolicExpressionsAt(Addr A)
Find all the symbolic expressions that start at an address.
Definition: Module.hpp:1685
const_block_range blocks() const
Return a range of all the blocks.
Definition: Module.hpp:1132
data_block_range findDataBlocksAt(Addr A)
Find all the data blocks that start at an address.
Definition: Module.hpp:1549
@ IA32
Intel Architecture, 32-bit. Also known as i386.
const_section_iterator sections_begin() const
Return a constant iterator to the first Section.
Definition: Module.hpp:733
symbol_name_iterator symbols_by_name_end()
Return an iterator to the element following the last Symbol, ordered by name.
Definition: Module.hpp:490
const_symbol_name_iterator symbols_by_name_begin() const
Return a constant iterator to the first Symbol, ordered by name.
Definition: Module.hpp:485
block_range findBlocksAt(Addr Low, Addr High)
Find all the blocks that start between a range of addresses.
Definition: Module.hpp:1195
code_block_range code_blocks()
Return a range of all the CodeBlock objects.
Definition: Module.hpp:1308
symbol_name_iterator symbols_by_name_begin()
Return an iterator to the first Symbol, ordered by name.
Definition: Module.hpp:481
boost::iterator_range< MergeSortedIterator< Section::const_data_block_subrange::iterator, AddressLess > > const_data_block_subrange
Sub-range of DataBlock objects overlapping an address or range of addreses.
Definition: Module.hpp:1470
section_name_iterator sections_by_name_begin()
Return an iterator to the first Section.
Definition: Module.hpp:735
boost::indirect_iterator< SymbolSet::index< by_pointer >::type::iterator > symbol_iterator
Iterator over symbols (Symbol).
Definition: Module.hpp:370
code_block_subrange findCodeBlocksOn(Addr A)
Find all the code blocks that have bytes that lie within the address specified.
Definition: Module.hpp:1338
ISA
Definition: Module.hpp:75
void setEntryPoint(CodeBlock *CB)
Set the entry point of this module.
Definition: Module.hpp:279
block_iterator blocks_end()
Return an iterator to the element following the last block.
Definition: Module.hpp:1112
const_symbol_iterator symbols_begin() const
Return a constant iterator to the first Symbol.
Definition: Module.hpp:459
ProxyBlock * addProxyBlock(Context &C, Args &&... A)
Creates a new ProxyBlock in this module.
Definition: Module.hpp:349
const_code_block_subrange findCodeBlocksOn(Addr A) const
Find all the code blocks that have bytes that lie within the address specified.
Definition: Module.hpp:1355
const_symbolic_expression_range findSymbolicExpressionsAt(Addr Low, Addr High) const
Find all the symbolic expressions that start between a range of addresses.
Definition: Module.hpp:1738
symbolic_expression_range findSymbolicExpressionsAt(Addr Low, Addr High)
Find all the symbolic expressions that start between a range of addresses.
Definition: Module.hpp:1703
symbol_name_range findSymbols(const std::string &N)
Find symbols by name.
Definition: Module.hpp:584
section_range sections()
Return a range of the sections (Section).
Definition: Module.hpp:757
Types and operations for symbolic expressions.
boost::iterator_range< symbol_name_iterator > symbol_name_range
Range of symbols (Symbol).
Definition: Module.hpp:395
Class gtirb::Addr and related functions.
void setFileFormat(gtirb::FileFormat X)
Set the format of the binary pointed to by getBinaryPath().
Definition: Module.hpp:203
symbol_addr_iterator symbols_by_addr_begin()
Return an iterator to the first Symbol, ordered by address.
Definition: Module.hpp:511
MergeSortedIterator< Section::const_block_iterator, BlockAddressLess > const_block_iterator
Iterator over blocks.
Definition: Module.hpp:1090
@ MACHO
Mach object file format.
data_block_iterator data_blocks_begin()
Return an iterator to the first DataBlock.
Definition: Module.hpp:1473
boost::iterator_range< proxy_block_iterator > proxy_block_range
Range of proxy_blocks (ProxyBlock).
Definition: Module.hpp:288
ChangeStatus
Definition: Observer.hpp:19
gtirb::ByteOrder getByteOrder() const
Get the endianness of the instructions in this Module.
Definition: Module.hpp:269
ByteOrder
Definition: Module.hpp:99
const_symbolic_expression_range findSymbolicExpressionsAt(Addr A) const
Find all the symbolic expressions that start at an address.
Definition: Module.hpp:1720
@ IdaProDb64
IDA Pro database file.
boost::iterator_range< const_data_block_iterator > const_data_block_range
Range of DataBlock objects.
Definition: Module.hpp:1463
MergeSortedIterator< ByteInterval::symbolic_expression_iterator, ByteInterval::SymbolicExpressionElement::AddressLess > symbolic_expression_iterator
Iterator over SymbolicExpressionElement objects.
Definition: Section.hpp:908
@ RISCV64
Reduced Instruction Set Computer V, 64-bit.
const_symbol_addr_range findSymbols(Addr Lower, Addr Upper) const
Find symbols by a range of addresses.
Definition: Module.hpp:642
bool isRelocated() const
Has the image been loaded somewhere other than its preferred address?
Definition: Module.hpp:249
boost::iterator_range< MergeSortedIterator< Section::const_byte_interval_subrange::iterator, AddressLess > > const_byte_interval_subrange
Sub-range of ByteInterval objects overlapping addresses.
Definition: Module.hpp:919
boost::iterator_range< MergeSortedIterator< Section::code_block_subrange::iterator, AddressLess > > code_block_subrange
Sub-range of CodeBlock objects overlapping an address or range of addreses.
Definition: Module.hpp:1260
boost::iterator_range< const_symbol_ref_iterator > const_symbol_ref_range
Constant range of symbols (Symbol).
Definition: Module.hpp:452
Represents a Symbol, which maps a name to an object in the IR.
Definition: Symbol.hpp:43
FileFormat
Identifies an exectuable file format.
Definition: Module.hpp:58
const_symbol_range symbols() const
Return a constant range of the symbols (Symbol).
Definition: Module.hpp:476
data_block_iterator data_blocks_end()
Return an iterator to the element following the last DataBlock.
Definition: Module.hpp:1483
@ XCOFF
Non-COFF (files start with ANON_OBJECT_HEADER*)