Ghidra Decompiler Analysis Engine
|
A helper class for describing the similarity of the boolean condition between 2 CBRANCH operations. More...
#include <condexe.hh>
Public Member Functions | |
ConditionMarker (void) | |
Constructor. | |
~ConditionMarker (void) | |
Destructor. More... | |
bool | verifyCondition (PcodeOp *op, PcodeOp *initop) |
Perform the correlation test on two CBRANCH operations. | |
Static Public Member Functions | |
static bool | varnodeSame (Varnode *a, Varnode *b) |
Do the given Varnodes hold the same value, possibly as constants. More... | |
static bool | varnodeComplement (Varnode *a, Varnode *b) |
Do the given boolean Varnodes always hold complementary values. More... | |
A helper class for describing the similarity of the boolean condition between 2 CBRANCH operations.
This class determines if two CBRANCHs share the same condition. It also determines if the conditions are complements of each other, and/or they are shared along only one path.
The expression computing the root boolean value for one CBRANCH is marked out by setupInitOp(). For the other CBRANCH, findMatch() tries to find common Varnode in its boolean expression and then maps a critical path from the Varnode to the final boolean. Assuming the common Varnode exists, the method finalJudgement() decides if the two boolean values are the same, uncorrelated, or complements of one another.
ConditionMarker::~ConditionMarker | ( | void | ) |
Destructor.
Any marks on Varnodes in the root expression are cleared.