ROSE 0.11.145.293
Rose/BinaryAnalysis/Variables/BasicTypes.h
1#ifndef ROSE_BinaryAnalysis_Variables_BasicTypes_H
2#define ROSE_BinaryAnalysis_Variables_BasicTypes_H
3#include <featureTests.h>
4#ifdef ROSE_ENABLE_BINARY_ANALYSIS
5
6#include <Rose/BinaryAnalysis/AddressSet.h>
7
8#include <Sawyer/Attribute.h>
9#include <Sawyer/BitFlags.h>
10#include <Sawyer/Message.h>
11#include <Sawyer/Optional.h>
12
13#include <map>
14
15namespace Rose {
16namespace BinaryAnalysis {
17namespace Variables {
18
20// Types
22
23class BaseVariable;
24class GlobalVariable;
25class InstructionAccess;
26class StackFrame;
27class StackVariable;
28class VariableFinder;
29
33using VariableFinderPtr = std::shared_ptr<VariableFinder>;
34using VariableFinderConstPtr = std::shared_ptr<const VariableFinder>;
38using OffsetToAddress = std::map<int64_t /*offset*/, AddressSet>;
39
41using AddressToAddresses = std::map<Address, AddressSet>;
42
45
47enum class Access {
48 READ = 0x0001,
49 WRITE = 0x0002,
50};
51
54
56// Global variables
58
61
62// Key for storing uint64_t frame sizes in P2::Function objects.
63extern Sawyer::Attribute::Id ATTR_FRAME_SIZE;
64
65// Key for storing StackVariables in a P2::Function.
66extern Sawyer::Attribute::Id ATTR_LOCAL_VARS;
67
68// Key for storing GlobalVariables in a P2::Partitioner.
69extern Sawyer::Attribute::Id ATTR_GLOBAL_VARS;
70
72// Functions
74
79
84
86std::string offsetStr(int64_t offset);
87
89std::string sizeStr(uint64_t size);
90
91} // namespace
92} // namespace
93} // namespace
94
95#endif
96#endif
Range of values delimited by endpoints.
Definition Interval.h:31
Collection of streams.
Definition Message.h:1606
std::map< Address, AddressSet > AddressToAddresses
Mapping from addresses to address sets.
void initDiagnostics()
Initialize diagnostic output.
std::shared_ptr< const VariableFinder > VariableFinderConstPtr
Shared ownership pointer to VariableFinder.
std::shared_ptr< VariableFinder > VariableFinderPtr
Shared ownership pointer to VariableFinder.
std::string offsetStr(int64_t offset)
Format a stack offset as a string.
std::map< int64_t, AddressSet > OffsetToAddress
Mapping from stack offsets to address sets.
Sawyer::Message::Facility mlog
Diagnostic facility for variables.
std::string sizeStr(uint64_t size)
Format size as a string.
void initNamespace()
Initialize the namespace.
The ROSE library.
size_t Id
Attribute identification.
Definition Attribute.h:140