Merge remote-tracking branch 'origin/GP-3297_JumpValuesRangeDefault'

This commit is contained in:
Ryan Kurtz 2023-04-28 06:01:04 -04:00
commit 8322b17576
2 changed files with 9 additions and 4 deletions

View file

@ -344,9 +344,14 @@ bool JumpValuesRangeDefault::contains(uintb val) const
bool JumpValuesRangeDefault::initializeForReading(void) const bool JumpValuesRangeDefault::initializeForReading(void) const
{ {
if (range.getSize()==0) return false; if (range.getSize()==0) {
curval = extravalue;
lastvalue = true;
}
else {
curval = range.getMin(); curval = range.getMin();
lastvalue = false; lastvalue = false;
}
return true; return true;
} }

View file

@ -219,7 +219,7 @@ class JumpValuesRangeDefault : public JumpValuesRange {
uintb extravalue; ///< The extra value uintb extravalue; ///< The extra value
Varnode *extravn; ///< The starting Varnode associated with the extra value Varnode *extravn; ///< The starting Varnode associated with the extra value
PcodeOp *extraop; ///< The starting PcodeOp associated with the extra value PcodeOp *extraop; ///< The starting PcodeOp associated with the extra value
mutable bool lastvalue; ///< \b true is the extra value has been visited by the iterator mutable bool lastvalue; ///< \b true if the extra value has been visited by the iterator
public: public:
void setExtraValue(uintb val) { extravalue = val; } ///< Set the extra value explicitly void setExtraValue(uintb val) { extravalue = val; } ///< Set the extra value explicitly
void setDefaultVn(Varnode *vn) { extravn = vn; } ///< Set the associated start Varnode void setDefaultVn(Varnode *vn) { extravn = vn; } ///< Set the associated start Varnode