ROSE
0.9.6a
|
Represents a region of static data within the address space being disassembled. More...
#include <Partitioner.h>
Public Member Functions | |
DataBlock () | |
Constructor. More... | |
~DataBlock () | |
Destructor. More... | |
rose_addr_t | address () const |
Returns the first address of a data block. More... | |
Public Attributes | |
std::vector< SgAsmStaticData * > | nodes |
The static data nodes belonging to this block; not deleted. More... | |
unsigned | reason |
Reasons this block was created; SgAsmBlock::Reason bit flags. More... | |
Function * | function |
Function to which this data block is explicitly assigned, or null. More... | |
BasicBlock * | basic_block |
Basic block to which this data block is bound, or null. More... | |
Represents a region of static data within the address space being disassembled.
Each data block will eventually become an SgAsmBlock node in the AST if it is assigned to a function.
A DataBlock can be associated with a function, a basic block, both, or neither. When associated with both, the function takes precedence (if the function association is broken, the basic block association remains). When associated with a basic block (and not a function), the data block will appear to move from function to function as its basic block moves. When associated with neither, the basic block may ultimately be added to a "leftovers" function or discarded. See the append() method for associating a data block with a function or basic block, and the remove() method for breaking the association.
The address of the first SgAsmStaticData node of a DataBlock should remain constant for the life of the DataBlock. This is because we use that address to establish a two-way link between the DataBlock and a Function object.
Definition at line 260 of file Partitioner.h.
|
inline |
Constructor.
This constructor should not be called directly since the Partitioner has other pointers that it needs to establish to this block. Instead, call one of the Partitioner's data block creation functions, such as Partitioner::find_db_starting().
Definition at line 264 of file Partitioner.h.
|
inline |
Destructor.
This destructor should not be called directly since there are other pointers in the Partitioner that this block does not know about. Instead, call Partitioner::discard().
Definition at line 268 of file Partitioner.h.
rose_addr_t Partitioner::DataBlock::address | ( | ) | const |
Returns the first address of a data block.
This might not be the lowest address–it's just the starting address of the first data node that was added.
Definition at line 496 of file Partitioner.C.
Referenced by Partitioner::append(), Partitioner::build_ast(), and Partitioner::remove().
std::vector<SgAsmStaticData*> Partitioner::DataBlock::nodes |
The static data nodes belonging to this block; not deleted.
Definition at line 271 of file Partitioner.h.
Referenced by Partitioner::build_ast(), Partitioner::datablock_extent(), Partitioner::find_db_starting(), Partitioner::fixup_pointers(), and Partitioner::is_contiguous().
unsigned Partitioner::DataBlock::reason |
Reasons this block was created; SgAsmBlock::Reason bit flags.
Definition at line 272 of file Partitioner.h.
Referenced by Partitioner::adjust_padding(), Partitioner::append(), Partitioner::build_ast(), Partitioner::detach_thunk(), and Partitioner::padding_extent().
Function* Partitioner::DataBlock::function |
Function to which this data block is explicitly assigned, or null.
Definition at line 273 of file Partitioner.h.
Referenced by Partitioner::append(), Partitioner::build_ast(), Partitioner::effective_function(), and Partitioner::remove().
BasicBlock* Partitioner::DataBlock::basic_block |
Basic block to which this data block is bound, or null.
Definition at line 274 of file Partitioner.h.
Referenced by Partitioner::append(), Partitioner::effective_function(), and Partitioner::remove().