ROSE 0.11.145.192
InstructionAccess.h
1#ifndef ROSE_BinaryAnalysis_Variables_InstructionAccess_H
2#define ROSE_BinaryAnalysis_Variables_InstructionAccess_H
3#include <featureTests.h>
4#ifdef ROSE_ENABLE_BINARY_ANALYSIS
5
6#include <Rose/BinaryAnalysis/Variables/BasicTypes.h>
7
8#ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
9#include <boost/serialization/access.hpp>
10#endif
11
12namespace Rose {
13namespace BinaryAnalysis {
14namespace Variables {
15
18public:
22private:
23 InstructionAccess() = default; // needed for boost::serialization
24public:
27
29 InstructionAccess(const Address insnAddr, const AccessFlags);
30
31#ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
32private:
33 friend class boost::serialization::access;
34
35 template<class S>
36 void serialize(S &s, const unsigned /*version*/) {
37 s & BOOST_SERIALIZATION_NVP(address_);
38 s & BOOST_SERIALIZATION_NVP(access_);
39 }
40#endif
41
42public:
49
64 std::string accessString() const;
65 static std::string accessString(AccessFlags);
69 std::string toString() const;
70};
71
72std::ostream& operator<<(std::ostream&, const InstructionAccess&);
73
74} // namespace
75} // namespace
76} // namespace
77
78#endif
79#endif
Information about how an instruction accesses a variable.
std::string accessString() const
String describing access.
InstructionAccess(const AccessFlags)
Constructor for variables created by no instruction.
AccessFlags access() const
Property: Access type.
AccessFlags & access()
Property: Access type.
Sawyer::Optional< Address > address_
Address of instruction accessing the variable.
AccessFlags access_
How the instruction accesses the variable.
std::string toString() const
String representation of this object.
Sawyer::Optional< Address > address() const
Property: Instruction address.
InstructionAccess(const Address insnAddr, const AccessFlags)
Constructor for variables created by an instruction.
static std::string accessString(AccessFlags)
String describing access.
Holds a value or nothing.
Definition Optional.h:56
std::uint64_t Address
Address.
Definition Address.h:11
The ROSE library.