decompiler
1.0.0
|
Placeholder node for Varnode that will exist after a transform is applied to a function. More...
#include <transform.hh>
Public Types | |
enum | { piece = 1, preexisting = 2, normal_temp = 3, piece_temp = 4, constant = 5, constant_iop = 6 } |
Types of replacement Varnodes. More... | |
enum | { split_terminator = 1, input_duplicate = 2 } |
Flags for a TransformVar. More... | |
Public Member Functions | |
Varnode * | getOriginal (void) const |
Get the original Varnode this placeholder models. | |
TransformOp * | getDef (void) const |
Get the operator that defines this placeholder variable. | |
Private Member Functions | |
void | createReplacement (Funcdata *fd) |
Create the new/modified variable this placeholder represents. More... | |
void | initialize (uint4 tp, Varnode *v, int4 bits, int4 bytes, uintb value) |
Initialize this variable from raw data. More... | |
Private Attributes | |
Varnode * | vn |
Original big Varnode of which this is a component. | |
Varnode * | replacement |
The new explicit lane Varnode. | |
uint4 | type |
Type of new Varnode. | |
uint4 | flags |
Boolean properties of the placeholder. | |
int4 | byteSize |
Size of the lane Varnode in bytes. | |
int4 | bitSize |
Size of the logical value in bits. | |
uintb | val |
Value of constant or (bit) position within the original big Varnode. | |
TransformOp * | def |
Defining op for new Varnode. | |
Friends | |
class | TransformManager |
class | TransformOp |
Placeholder node for Varnode that will exist after a transform is applied to a function.
anonymous enum |
Types of replacement Varnodes.
Enumerator | |
---|---|
piece | |
preexisting | Varnode preexisted in the original data-flow. |
normal_temp | A new temporary (unique space) Varnode. |
piece_temp | A temporary representing a piece of an original Varnode. |
constant | A new constant Varnode. |
constant_iop | Special iop constant encoding a PcodeOp reference. |
anonymous enum |
Flags for a TransformVar.
Enumerator | |
---|---|
split_terminator | The last (most significant piece) of a split array. |
input_duplicate | This is a piece of an input that has already been visited. |
|
private |
Create the new/modified variable this placeholder represents.
Create the Varnode object (constant, unique, vector piece) described by the given placeholder. If the Varnode is an output, assume the op already exists and create the Varnode as an output. Set the replacement field with the new Varnode.
fd | is the function in which to create the replacement |
References constant, constant_iop, ghidra::Funcdata::getArch(), ghidra::AddrSpaceManager::getIopSpace(), ghidra::PcodeOp::getOpFromConst(), ghidra::Funcdata::newConstant(), ghidra::Funcdata::newUnique(), ghidra::Funcdata::newUniqueOut(), ghidra::Funcdata::newVarnode(), ghidra::Funcdata::newVarnodeIop(), ghidra::Funcdata::newVarnodeOut(), normal_temp, piece, piece_temp, preexisting, ghidra::Address::renormalize(), and ghidra::Funcdata::transferVarnodeProperties().
Referenced by ghidra::TransformManager::createVarnodes().
|
inlineprivate |
Initialize this variable from raw data.
tp | is the type of variable to create |
v | is the underlying Varnode of which this is a piece (may be null) |
bits | is the number of bits in the variable |
bytes | is the number of bytes in the variable |
value | is the associated value |
References bitSize, byteSize, def, flags, replacement, type, val, and vn.
Referenced by ghidra::TransformManager::newConstant(), ghidra::TransformManager::newIop(), ghidra::TransformManager::newPiece(), ghidra::TransformManager::newPreexistingVarnode(), ghidra::TransformManager::newSplit(), and ghidra::TransformManager::newUnique().