Ghidra is a software reverse engineering (SRE) framework
got rid of FULL typeCode
caheckman0c5bd081c539
diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/rangeutil.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/rangeutil.ccindex 0359468c95..2ae2397b36 100644--- a/Ghidra/Features/Decompiler/src/decompile/cpp/rangeutil.cc+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/rangeutil.cc@@ -1423,7 +1423,6 @@ void CircleRange::printRaw(ostream &s) const}}-const int4 ValueSet::FULL = 100;const int4 ValueSet::MAX_STEP = 32;/// The initial values in \b this are set based on the type of Varnode:@@ -1462,7 +1461,7 @@ void ValueSet::setVarnode(Varnode *v,int4 tCode)else { // Some other form of inputopCode = CPUI_MAX;numParams = 0;- typeCode = FULL;+ typeCode = 0;range.setFull(vn->getSize());}}@@ -1581,7 +1580,7 @@ bool ValueSet::iterate(void){if (!vn->isWritten()) return false;- if (typeCode >= FULL) return false;+ if (range.isFull()) return false;if (count == 0)computeTypeCode();count += 1; // Count this iteration@@ -1721,7 +1720,7 @@ void ValueSetRead::setPcodeOp(PcodeOp *o,int4 slt)typeCode = 0;op = o;slot = slt;- equationTypeCode = ValueSet::FULL;+ equationTypeCode = -1;}/// \param slt is the given slot@@ -1757,6 +1756,7 @@ void ValueSetRead::printRaw(ostream &s) const{s << "Read: " << get_opname(op->code());+ s << '(' << op->getSeqNum() << ')';if (typeCode == 0)s << " absolute ";elsediff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/rangeutil.hh b/Ghidra/Features/Decompiler/src/decompile/cpp/rangeutil.hhindex 5d97182b47..519ec1e3fd 100644--- a/Ghidra/Features/Decompiler/src/decompile/cpp/rangeutil.hh+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/rangeutil.hh@@ -109,7 +109,6 @@ class Partition; // Forward declaration/// or some other register (if \b typeCode is non-zero).class ValueSet {public:- static const int4 FULL; ///< Special typeCode indicating is permanently marked fullstatic const int4 MAX_STEP; ///< Maximum step inferred for a value set/// \brief An external that can be applied to a ValueSet///@@ -136,7 +135,7 @@ private:Partition *partHead; ///< If Varnode is a component head, pointer to corresponding PartitionValueSet *next; ///< Next ValueSet to iteratebool doesEquationApply(int4 num,int4 slot) const; ///< Does the indicated equation apply for the given input slot- void setFull(void) { range.setFull(vn->getSize()); typeCode = FULL; } ///< Mark value set as possibly containing any value+ void setFull(void) { range.setFull(vn->getSize()); typeCode = 0; } ///< Mark value set as possibly containing any valuevoid setVarnode(Varnode *v,int4 tCode); ///< Attach \b this to given Varnode and set initial valuesvoid addEquation(int4 slot,int4 type,const CircleRange &constraint); ///< Insert an equation restricting \b this value setvoid addLandmark(int4 type,const CircleRange &constraint) { addEquation(numParams,type,constraint); } ///< Add a widening landmark