decompiler 1.0.0
Public Member Functions | Private Types | Private Attributes | Friends | List of all members
ghidra::BitFieldPullTransform::PullRecord Class Reference

Info about a single read by a PcodeOp that can be treated as a pull of 1 or more bitfields. More...

Public Member Functions

 PullRecord (const BitFieldNodeState &state, PcodeOp *op)
 Construct pull record for a specific PcodeOp read.
 
 PullRecord (const BitFieldNodeState &state, PcodeOp *op, uintb val)
 Construct record for a pull into an INT_EQUAL or INT_NOTEQUAL.
 
 PullRecord (PcodeOp *op)
 Construct record representing an abort.
 
bool operator< (const PullRecord &op2) const
 Compare records.
 

Private Types

enum  { normal = 0 , equal = 1 , aborted = 2 }
 

Private Attributes

VarnodereadVn
 Varnode holding pulled value.
 
PcodeOpreadOp
 Op reading the pulled value, or null if readVn itself is redefined.
 
Datatypedt
 Data-type associated with the pulled value.
 
int4 type
 Type of pull.
 
int4 pos
 Bit position of field being pulled.
 
int4 numBits
 Number of bits in field being pulled.
 
int4 leftShift
 Amount final field is left shifted.
 
uintb mask
 Mask representing the bitfield within the Varnode.
 

Friends

class BitFieldPullTransform
 

Detailed Description

Info about a single read by a PcodeOp that can be treated as a pull of 1 or more bitfields.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
normal 

A single field pull.

equal 

Pull for INT_EQUAL or INT_NOTEQUAL.

aborted 

Code to indicate that the pull for the entire PcodeOp should be aborted.

Constructor & Destructor Documentation

◆ PullRecord() [1/3]

ghidra::BitFieldPullTransform::PullRecord::PullRecord ( const BitFieldNodeState state,
PcodeOp op 
)

Construct pull record for a specific PcodeOp read.

If a PcodeOp is given, the specific read of the state.readVn will be replaced with a new unique Varnode holding the effective extraction. Otherwise the state.readVn will be redefined as an extraction for all reads.

Parameters
stateholds the extracted Varnode and the position of the bitfield at the point of extraction
opis the specific PcodeOp reading the extracted field or null

References ghidra::TypeBitField::bits, ghidra::BitFieldNodeState::bitsField, dt, ghidra::BitFieldNodeState::field, ghidra::BitRange::leastSigBit, leftShift, mask, ghidra::BitFieldNodeState::node, normal, ghidra::BitRange::numBits, numBits, ghidra::BitFieldNodeState::origLeastSigBit, pos, readOp, readVn, type, and ghidra::TypeBitField::type.

◆ PullRecord() [2/3]

ghidra::BitFieldPullTransform::PullRecord::PullRecord ( const BitFieldNodeState state,
PcodeOp op,
uintb  val 
)

Construct record for a pull into an INT_EQUAL or INT_NOTEQUAL.

Parameters
stateholds the extracted Varnode and the position of the bitfield at the point of extraction
opis the specific INT_EQUAL or INT_NOTEQUAL PcodeOp reading the extracted field
valis a mask representing the bitfield within the Varnode

References ghidra::TypeBitField::bits, ghidra::BitFieldNodeState::bitsField, ghidra::BitFieldNodeState::field, ghidra::BitRange::leastSigBit, ghidra::BitFieldNodeState::node, ghidra::BitRange::numBits, ghidra::BitFieldNodeState::origLeastSigBit, and ghidra::TypeBitField::type.

◆ PullRecord() [3/3]

ghidra::BitFieldPullTransform::PullRecord::PullRecord ( PcodeOp op)

Construct record representing an abort.

Parameters
opis the PcodeOp whose input pull is being aborted

Member Function Documentation

◆ operator<()

bool ghidra::BitFieldPullTransform::PullRecord::operator< ( const PullRecord op2) const

Compare records.

Sort based on the PcodeOp whose input is being pulled

Parameters
op2is the record to compare with this
Returns
true if this comes before op2

References ghidra::PcodeOp::getSeqNum(), and readOp.


The documentation for this class was generated from the following files: