Ghidra Decompiler Analysis Engine
|
Container class for PcodeOps associated with a single function. More...
#include <op.hh>
Public Member Functions | |
void | clear (void) |
Clear all PcodeOps from this container. | |
PcodeOp * | create (int4 inputs, const Address &pc) |
Create a PcodeOp with at a given Address. More... | |
PcodeOp * | create (int4 inputs, const SeqNum &sq) |
Create a PcodeOp with a given sequence number. More... | |
void | destroy (PcodeOp *op) |
Destroy/retire the given PcodeOp. More... | |
void | destroyDead (void) |
Destroy/retire all PcodeOps in the dead list. | |
void | changeOpcode (PcodeOp *op, TypeOp *newopc) |
Change the op-code for the given PcodeOp. More... | |
void | markAlive (PcodeOp *op) |
Mark the given PcodeOp as alive. More... | |
void | markDead (PcodeOp *op) |
Mark the given PcodeOp as dead. More... | |
void | insertAfterDead (PcodeOp *op, PcodeOp *prev) |
Insert the given PcodeOp after a point in the dead list. More... | |
void | moveSequenceDead (PcodeOp *firstop, PcodeOp *lastop, PcodeOp *prev) |
Move a sequence of PcodeOps to a point in the dead list. More... | |
void | markIncidentalCopy (PcodeOp *firstop, PcodeOp *lastop) |
Mark any COPY ops in the given range as incidental. More... | |
PcodeOp * | target (const Address &addr) const |
Find the first executing PcodeOp for a target address. More... | |
PcodeOp * | findOp (const SeqNum &num) const |
Find a PcodeOp by sequence number. More... | |
PcodeOp * | fallthru (const PcodeOp *op) const |
Find the PcodeOp considered a fallthru of the given PcodeOp. More... | |
PcodeOpTree::const_iterator | beginAll (void) const |
Start of all PcodeOps in sequence number order. | |
PcodeOpTree::const_iterator | endAll (void) const |
End of all PcodeOps in sequence number order. | |
PcodeOpTree::const_iterator | begin (const Address &addr) const |
Start of all PcodeOps at one Address. | |
PcodeOpTree::const_iterator | end (const Address &addr) const |
End of all PcodeOps at one Address. | |
list< PcodeOp * >::const_iterator | beginAlive (void) const |
Start of all PcodeOps marked as alive. | |
list< PcodeOp * >::const_iterator | endAlive (void) const |
End of all PcodeOps marked as alive. | |
list< PcodeOp * >::const_iterator | beginDead (void) const |
Start of all PcodeOps marked as dead. | |
list< PcodeOp * >::const_iterator | endDead (void) const |
End of all PcodeOps marked as dead. | |
list< PcodeOp * >::const_iterator | begin (OpCode opc) const |
Start of all PcodeOps sharing the given op-code. | |
list< PcodeOp * >::const_iterator | end (OpCode opc) const |
End of all PcodeOps sharing the given op-code. | |
Container class for PcodeOps associated with a single function.
The PcodeOp objects are maintained under multiple different sorting criteria to facilitate quick access in various situations. The main sort (PcodeOpTree) is by sequence number (SeqNum). PcodeOps are also grouped into alive and dead lists to distinguish between raw p-code ops and those that are fully linked into control-flow. Several lists group PcodeOps with important op-codes (like STORE and RETURN).
Create a PcodeOp with a given sequence number.
A new PcodeOp is allocated with the indicated number of input slots and the specific sequence number, suitable for cloning and restoring from XML. The op is added to the end of the dead list.
inputs | is the number of input slots |
sq | is the specified sequence number |
void PcodeOpBank::destroy | ( | PcodeOp * | op | ) |
Destroy/retire the given PcodeOp.
The given PcodeOp is removed from all internal lists and added to a final deadandgone list. The memory is not reclaimed until the whole container is destroyed, in case pointer references still exist. These will all still be marked as dead.
op | is the given PcodeOp to destroy |
void PcodeOpBank::markAlive | ( | PcodeOp * | op | ) |
void PcodeOpBank::markDead | ( | PcodeOp * | op | ) |
Mark any COPY ops in the given range as incidental.
Incidental COPYs are not considered active use of parameter passing Varnodes by parameter analysis algorithms.
firstop | is the start of the range of incidental COPY ops |
lastop | is the end of the range of incidental COPY ops |