ROSE 0.11.145.134
|
Information about an instruction.
Definition at line 271 of file ParallelPartitioner.h.
#include <Rose/BinaryAnalysis/Partitioner2/ParallelPartitioner.h>
Classes | |
struct | Cached |
Cached information. More... | |
Public Types | |
using | Ptr = std::shared_ptr< InsnInfo > |
Shared ownership pointer. | |
using | List = std::vector< Ptr > |
List of pointers to InsnInfo objects. | |
Public Member Functions | |
InsnInfo (const InstructionPtr &insn) | |
Construct info with decoded instruction. | |
InsnInfo (rose_addr_t va) | |
Construct info from only an address. | |
rose_addr_t | address () const |
Address of instruction. | |
Sawyer::Optional< size_t > | size () const |
Size of instruciton in bytes if known. | |
Sawyer::Optional< AddressInterval > | hull () const |
Location of instruction if known. | |
InstructionPtr | ast () const |
Get the underlying instruction AST. | |
FunctionReasons | functionReasons () const |
Property: Function reasons. | |
void | functionReasons (FunctionReasons) |
Property: Function reasons. | |
void | insertFunctionReasons (FunctionReasons) |
Property: Function reasons. | |
void | eraseFunctionReasons (FunctionReasons) |
Property: Function reasons. | |
const Cached & | cached () const |
Cached information. | |
Cached & | cached () |
Cached information. | |
bool | wasDecoded () const |
Whether any attempt was made to decode this instruction. | |
void | setDecoded () |
Whether any attempt was made to decode this instruction. | |
Static Public Member Functions | |
static bool | addressOrder (const Ptr &a, const Ptr &b) |
For sorty by address. | |
static uint64_t | hash (const List &) |
Hash instruction list. | |
using Rose::BinaryAnalysis::Partitioner2::Experimental::ParallelPartitioner::InsnInfo::Ptr = std::shared_ptr<InsnInfo> |
Shared ownership pointer.
Definition at line 273 of file ParallelPartitioner.h.
using Rose::BinaryAnalysis::Partitioner2::Experimental::ParallelPartitioner::InsnInfo::List = std::vector<Ptr> |
List of pointers to InsnInfo objects.
Definition at line 274 of file ParallelPartitioner.h.
|
inlineexplicit |
Construct info with decoded instruction.
The insn
must be non-null.
Definition at line 304 of file ParallelPartitioner.h.
|
inlineexplicit |
Construct info from only an address.
Definition at line 311 of file ParallelPartitioner.h.
|
inline |
Address of instruction.
The starting address of the instruction. This information is available for every object, even if we've never attempted to decode an instruction at that address and wasDecoded is returning false. The address is provided by the constructor and is read only.
Thread safety: This function is thread safe.
Definition at line 321 of file ParallelPartitioner.h.
Sawyer::Optional< size_t > Rose::BinaryAnalysis::Partitioner2::Experimental::ParallelPartitioner::InsnInfo::size | ( | ) | const |
Size of instruciton in bytes if known.
The size of an instruction is known only after wasDecoded is returning true; before that, this function returns nothing. After an instruction is decoded, its size is available regardless of whether the instruction AST is in memory or has been evicted.
Thread safety: This function is thread safe.
Sawyer::Optional< AddressInterval > Rose::BinaryAnalysis::Partitioner2::Experimental::ParallelPartitioner::InsnInfo::hull | ( | ) | const |
Location of instruction if known.
The addresses occupied by this instruction. This is a combination of the starting address and instruction size and therefore is available only after wasDecoded is returning true. This information is available even when the instruction AST is evicted from the cache.
Thread safety: This function is thread safe.
FunctionReasons Rose::BinaryAnalysis::Partitioner2::Experimental::ParallelPartitioner::InsnInfo::functionReasons | ( | ) | const |
Property: Function reasons.
This is a set of reason bits that describe why this instruction is the entry point of a function. If the set is empty then this instruction is not a function entry point.
Thread safety: This function is thread safe.
void Rose::BinaryAnalysis::Partitioner2::Experimental::ParallelPartitioner::InsnInfo::functionReasons | ( | FunctionReasons | ) |
Property: Function reasons.
This is a set of reason bits that describe why this instruction is the entry point of a function. If the set is empty then this instruction is not a function entry point.
Thread safety: This function is thread safe.
void Rose::BinaryAnalysis::Partitioner2::Experimental::ParallelPartitioner::InsnInfo::insertFunctionReasons | ( | FunctionReasons | ) |
Property: Function reasons.
This is a set of reason bits that describe why this instruction is the entry point of a function. If the set is empty then this instruction is not a function entry point.
Thread safety: This function is thread safe.
void Rose::BinaryAnalysis::Partitioner2::Experimental::ParallelPartitioner::InsnInfo::eraseFunctionReasons | ( | FunctionReasons | ) |
Property: Function reasons.
This is a set of reason bits that describe why this instruction is the entry point of a function. If the set is empty then this instruction is not a function entry point.
Thread safety: This function is thread safe.
|
inline |
Cached information.
Returns informatio that's cached at a particular CFG vertex.
Thread safety: This function is thread safe.
Definition at line 364 of file ParallelPartitioner.h.
|
inline |
Cached information.
Returns informatio that's cached at a particular CFG vertex.
Thread safety: This function is thread safe.
Definition at line 365 of file ParallelPartitioner.h.
bool Rose::BinaryAnalysis::Partitioner2::Experimental::ParallelPartitioner::InsnInfo::wasDecoded | ( | ) | const |
Whether any attempt was made to decode this instruction.
An InsnInfo object can exist without there having ever been any attempt to actually decode an instruction at the specified address. In this case, the ast will be a null pointer, but that's indistinguishable from the case when a decode was attempted and failed. Therefore, this flag will be set after the first decode is attempted.
Certain other properties of an instruction, such as its size, are only available after the instruction was decoded.
Once wasDecoded
returns true it will always return true.
Thread safety: This function is thread safe.
void Rose::BinaryAnalysis::Partitioner2::Experimental::ParallelPartitioner::InsnInfo::setDecoded | ( | ) |
Whether any attempt was made to decode this instruction.
An InsnInfo object can exist without there having ever been any attempt to actually decode an instruction at the specified address. In this case, the ast will be a null pointer, but that's indistinguishable from the case when a decode was attempted and failed. Therefore, this flag will be set after the first decode is attempted.
Certain other properties of an instruction, such as its size, are only available after the instruction was decoded.
Once wasDecoded
returns true it will always return true.
Thread safety: This function is thread safe.
InstructionPtr Rose::BinaryAnalysis::Partitioner2::Experimental::ParallelPartitioner::InsnInfo::ast | ( | ) | const |
Get the underlying instruction AST.
Returns the underlying instruction. The wasDecoded flag must be set before calling this. Returns a null pointer if the memory is invalid (not mapped or not executable), or a non-null pointer (possibly an "unknown" instruction) otherwise.
Thread safety: This function is thread safe.
|
static |
For sorty by address.
Returns true if the address of a
is less than the address of b
.
Thread safety: This instruction is thread safe.
|
static |
Hash instruction list.
Hashes the specified list of instructions in order to get a value that can be used as a lookup key.
Thread safety: This function is thread safe.