ROSE 0.11.145.147
|
Control flow graph vertex.
Definition at line 29 of file ControlFlowGraph.h.
#include <Rose/BinaryAnalysis/Partitioner2/ControlFlowGraph.h>
Public Member Functions | |
CfgVertex (rose_addr_t startVa) | |
Construct a basic block placeholder vertex. | |
CfgVertex (const BasicBlockPtr &bb) | |
Construct a basic block vertex. | |
CfgVertex (VertexType type) | |
Construct a special vertex. | |
VertexType | type () const |
Returns the vertex type. | |
Sawyer::Optional< rose_addr_t > | optionalAddress () const |
Safe version of starting address. | |
Sawyer::Optional< rose_addr_t > | optionalLastAddress () const |
Address of last item in the vertex. | |
AddressIntervalSet | addresses () const |
Compute entire address set. | |
bool | insertOwningFunction (const FunctionPtr &) |
Add a function to the list of functions that own this vertex. | |
void | eraseOwningFunction (const FunctionPtr &) |
Remove a function from the list of functions that own this vertex. | |
bool | isOwningFunction (const FunctionPtr &) const |
Determines if a function owns this vertex. | |
size_t | nOwningFunctions () const |
Number of functions that own this vertex. | |
FunctionPtr | isEntryBlock () const |
Is block a function entry block? | |
void | nullify () |
Turns a basic block vertex into a placeholder. | |
rose_addr_t | address () const |
Property: starting address. | |
void | address (rose_addr_t) |
Property: starting address. | |
const BasicBlockPtr & | bblock () const |
Property: basic block. | |
void | bblock (const BasicBlockPtr &) |
Property: basic block. | |
const FunctionSet & | owningFunctions () const |
Property: Owning functions. | |
FunctionSet & | owningFunctions () |
Property: Owning functions. | |
rose_addr_t Rose::BinaryAnalysis::Partitioner2::CfgVertex::address | ( | ) | const |
Property: starting address.
The virtual address for a placeholder or basic block. User-defined vertices can use this for whatever they want. Calling this for a vertex that's not a basic block or user defined type results in undefined behavior.
See also, optionalAddress.
void Rose::BinaryAnalysis::Partitioner2::CfgVertex::address | ( | rose_addr_t | ) |
Property: starting address.
The virtual address for a placeholder or basic block. User-defined vertices can use this for whatever they want. Calling this for a vertex that's not a basic block or user defined type results in undefined behavior.
See also, optionalAddress.
Sawyer::Optional< rose_addr_t > Rose::BinaryAnalysis::Partitioner2::CfgVertex::optionalAddress | ( | ) | const |
Safe version of starting address.
This is the same as address but doesn't fail if there is no address.
Sawyer::Optional< rose_addr_t > Rose::BinaryAnalysis::Partitioner2::CfgVertex::optionalLastAddress | ( | ) | const |
Address of last item in the vertex.
If the vertex is a basic block with more than one instruction, then return the address of its last instruction. Otherwise, this is the same as optionalAddress.
AddressIntervalSet Rose::BinaryAnalysis::Partitioner2::CfgVertex::addresses | ( | ) | const |
Compute entire address set.
Constructs and returns an address set containing all addresses represented by this vertex. For basic block vertices, this is the union of the addresses occupied by the instructions (not just the starting address of each instruction). For user-defined vertices, this method returns a singleton address. All other vertex types return an empty set since it is generally their predecessors that have addresses (e.g., each undiscovered basic block is a basic-block CFG vertex whose successor is the special "undiscovered" vertex which has no distinct address.
const BasicBlockPtr & Rose::BinaryAnalysis::Partitioner2::CfgVertex::bblock | ( | ) | const |
Property: basic block.
Pointer to a basic block. This property is available for V_BASIC_BLOCK or V_USER_DEFINED vertices. A V_BASIC_BLOCK vertex with a null bblock property is called a "placeholder". Other types of vertices are not allowed to set a basic block, and will always return a null pointer.
void Rose::BinaryAnalysis::Partitioner2::CfgVertex::bblock | ( | const BasicBlockPtr & | ) |
Property: basic block.
Pointer to a basic block. This property is available for V_BASIC_BLOCK or V_USER_DEFINED vertices. A V_BASIC_BLOCK vertex with a null bblock property is called a "placeholder". Other types of vertices are not allowed to set a basic block, and will always return a null pointer.
bool Rose::BinaryAnalysis::Partitioner2::CfgVertex::insertOwningFunction | ( | const FunctionPtr & | ) |
Add a function to the list of functions that own this vertex.
Returns true if the function was added, false if it was already an owner of the vertex.
void Rose::BinaryAnalysis::Partitioner2::CfgVertex::eraseOwningFunction | ( | const FunctionPtr & | ) |
Remove a function from the list of functions that own this vertex.
Causes the specified function to no longer be listed as an owner of this vertex. Does nothing if the function is not an owner to begin with.
bool Rose::BinaryAnalysis::Partitioner2::CfgVertex::isOwningFunction | ( | const FunctionPtr & | ) | const |
Determines if a function owns this vertex.
Returns true if the specified function is listed as an owning function of this vertex, false otherwise.
const FunctionSet & Rose::BinaryAnalysis::Partitioner2::CfgVertex::owningFunctions | ( | ) | const |
Property: Owning functions.
Certain kinds of vertices can be owned by zero or more functions, and this property holds the set of such functions. See also, insertOwningFunction, eraseOwningFunction, and isOwningFunction. This property is available for V_BASIC_BLOCK and V_USER_DEFINED vertices.
FunctionSet & Rose::BinaryAnalysis::Partitioner2::CfgVertex::owningFunctions | ( | ) |
Property: Owning functions.
Certain kinds of vertices can be owned by zero or more functions, and this property holds the set of such functions. See also, insertOwningFunction, eraseOwningFunction, and isOwningFunction. This property is available for V_BASIC_BLOCK and V_USER_DEFINED vertices.
FunctionPtr Rose::BinaryAnalysis::Partitioner2::CfgVertex::isEntryBlock | ( | ) | const |
Is block a function entry block?
Returns true (a non-null function pointer) if this block serves as the entry block for some function.
void Rose::BinaryAnalysis::Partitioner2::CfgVertex::nullify | ( | ) |
Turns a basic block vertex into a placeholder.
The basic block pointer is reset to null.