@@ -10632,7 +10632,7 @@ namespace BinaryNinja {
1063210632 size_t count;
1063310633
1063410634 static PossibleValueSet FromAPIObject(BNPossibleValueSet& value);
10635- BNPossibleValueSet ToAPIObject();
10635+ BNPossibleValueSet ToAPIObject() const ;
1063610636 static void FreeAPIObject(BNPossibleValueSet* value);
1063710637 };
1063810638
@@ -11189,11 +11189,14 @@ namespace BinaryNinja {
1118911189
1119011190 Ref<FlowGraph> GetUnresolvedStackAdjustmentGraph();
1119111191
11192- void SetUserVariableValue(const Variable& var, uint64_t defAddr, PossibleValueSet& value);
11193- void ClearUserVariableValue(const Variable& var, uint64_t defAddr);
11194- std::map<Variable, std::map<ArchAndAddr, PossibleValueSet>> GetAllUserVariableValues();
11192+ void SetUserVariableValue(const Variable& var, const ArchAndAddr& defAddr, PossibleValueSet& value, bool after = true );
11193+ void ClearUserVariableValue(const Variable& var, const ArchAndAddr& defAddr, bool after = true );
11194+ std::map<Variable, std::map<std::pair< ArchAndAddr, bool> , PossibleValueSet>> GetAllUserVariableValues();
1119511195 void ClearAllUserVariableValues();
1119611196
11197+ void CreateForcedVariableVersion(const Variable& var, const ArchAndAddr& location);
11198+ void ClearForcedVariableVersion(const Variable& var, const ArchAndAddr& location);
11199+
1119711200 void RequestDebugReport(const std::string& name);
1119811201
1119911202 /*! Get the name for a given label ID
@@ -11803,6 +11806,9 @@ namespace BinaryNinja {
1180311806 std::vector<SSARegisterStack> GetSSARegisterStacks();
1180411807 std::vector<SSAFlag> GetSSAFlags();
1180511808
11809+ size_t CachePossibleValueSet(const PossibleValueSet& pvs);
11810+ PossibleValueSet GetCachedPossibleValueSet(size_t idx);
11811+
1180611812 ExprId AddExpr(BNLowLevelILOperation operation, size_t size, uint32_t flags, ExprId a = 0, ExprId b = 0,
1180711813 ExprId c = 0, ExprId d = 0);
1180811814 ExprId AddExprWithLocation(BNLowLevelILOperation operation, uint64_t addr, uint32_t sourceOperand, size_t size,
@@ -11891,6 +11897,12 @@ namespace BinaryNinja {
1189111897 ExprId SetFlag(uint32_t flag, ExprId val, const ILSourceLocation& loc = ILSourceLocation());
1189211898 ExprId SetFlagSSA(const SSAFlag& flag, ExprId val, const ILSourceLocation& loc = ILSourceLocation());
1189311899
11900+ ExprId ForceVer(size_t size, uint32_t reg, const ILSourceLocation& loc = ILSourceLocation());
11901+ ExprId ForceVerSSA(size_t size, SSARegister dst, SSARegister src, const ILSourceLocation& loc = ILSourceLocation());
11902+
11903+ ExprId Assert(size_t size, uint32_t reg, const PossibleValueSet& pvs, const ILSourceLocation& loc = ILSourceLocation());
11904+ ExprId AssertSSA(size_t size, SSARegister reg, const PossibleValueSet& pvs, const ILSourceLocation& loc = ILSourceLocation());
11905+
1189411906 /*! Reads \c size bytes from the expression \c addr
1189511907
1189611908 \param size Number of bytes to read
@@ -13187,6 +13199,9 @@ namespace BinaryNinja {
1318713199 */
1318813200 BNMediumLevelILLabel* GetLabelForSourceInstruction(size_t i);
1318913201
13202+ size_t CachePossibleValueSet(const PossibleValueSet& pvs);
13203+ PossibleValueSet GetCachedPossibleValueSet(size_t idx);
13204+
1319013205 ExprId AddExpr(BNMediumLevelILOperation operation, size_t size, ExprId a = 0, ExprId b = 0, ExprId c = 0,
1319113206 ExprId d = 0, ExprId e = 0);
1319213207 ExprId AddExprWithLocation(BNMediumLevelILOperation operation, uint64_t addr, uint32_t sourceOperand,
@@ -13210,6 +13225,13 @@ namespace BinaryNinja {
1321013225 const ILSourceLocation& loc = ILSourceLocation());
1321113226 ExprId SetVarAliasedField(size_t size, const Variable& dest, size_t newMemVersion, size_t prevMemVersion,
1321213227 uint64_t offset, ExprId src, const ILSourceLocation& loc = ILSourceLocation());
13228+
13229+ ExprId ForceVer(size_t size, const Variable& dest, const Variable& src, const ILSourceLocation& loc = ILSourceLocation());
13230+ ExprId ForceVerSSA(size_t size, const SSAVariable& dest, const SSAVariable& src, const ILSourceLocation& loc = ILSourceLocation());
13231+
13232+ ExprId Assert(size_t size, const Variable& src, const PossibleValueSet& pvs, const ILSourceLocation& loc = ILSourceLocation());
13233+ ExprId AssertSSA(size_t size, const SSAVariable& src, const PossibleValueSet& pvs, const ILSourceLocation& loc = ILSourceLocation());
13234+
1321313235 ExprId Load(size_t size, ExprId src, const ILSourceLocation& loc = ILSourceLocation());
1321413236 ExprId LoadStruct(size_t size, ExprId src, uint64_t offset, const ILSourceLocation& loc = ILSourceLocation());
1321513237 ExprId LoadSSA(size_t size, ExprId src, size_t memVersion, const ILSourceLocation& loc = ILSourceLocation());
@@ -13557,6 +13579,9 @@ namespace BinaryNinja {
1355713579 void SetRootExpr(ExprId expr);
1355813580 void SetRootExpr(const HighLevelILInstruction& expr);
1355913581
13582+ size_t CachePossibleValueSet(const PossibleValueSet& pvs);
13583+ PossibleValueSet GetCachedPossibleValueSet(size_t idx);
13584+
1356013585 ExprId AddExpr(BNHighLevelILOperation operation, size_t size, ExprId a = 0, ExprId b = 0, ExprId c = 0,
1356113586 ExprId d = 0, ExprId e = 0);
1356213587 ExprId AddExprWithLocation(BNHighLevelILOperation operation, uint64_t addr, uint32_t sourceOperand, size_t size,
@@ -13601,6 +13626,13 @@ namespace BinaryNinja {
1360113626 const ILSourceLocation& loc = ILSourceLocation());
1360213627 ExprId AssignUnpackMemSSA(const std::vector<ExprId>& output, size_t destMemVersion, ExprId src,
1360313628 size_t srcMemVersion, const ILSourceLocation& loc = ILSourceLocation());
13629+
13630+ ExprId ForceVer(size_t size, const Variable& dest, const Variable& src, const ILSourceLocation& loc = ILSourceLocation());
13631+ ExprId ForceVerSSA(size_t size, const SSAVariable& dest, const SSAVariable& src, const ILSourceLocation& loc = ILSourceLocation());
13632+
13633+ ExprId Assert(size_t size, const Variable& src, const PossibleValueSet& pvs, const ILSourceLocation& loc = ILSourceLocation());
13634+ ExprId AssertSSA(size_t size, const SSAVariable& src, const PossibleValueSet& pvs, const ILSourceLocation& loc = ILSourceLocation());
13635+
1360413636 ExprId Var(size_t size, const Variable& src, const ILSourceLocation& loc = ILSourceLocation());
1360513637 ExprId VarSSA(size_t size, const SSAVariable& src, const ILSourceLocation& loc = ILSourceLocation());
1360613638 ExprId VarPhi(const SSAVariable& dest, const std::vector<SSAVariable>& sources,
0 commit comments