From 29be664b3c91d135b54ed34976357bb7d3413e94 Mon Sep 17 00:00:00 2001 From: Rusty Wagner Date: Fri, 10 Mar 2017 19:21:10 -0500 Subject: Mappings between low level IL and medium level IL --- binaryninjaapi.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'binaryninjaapi.h') diff --git a/binaryninjaapi.h b/binaryninjaapi.h index f63deee1..ee342851 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -2149,6 +2149,7 @@ namespace BinaryNinja BNLowLevelILInstruction operator[](size_t i) const; size_t GetIndexForInstruction(size_t i) const; size_t GetInstructionCount() const; + size_t GetExprCount() const; void AddLabelForAddress(Architecture* arch, ExprId addr); BNLowLevelILLabel* GetLabelForAddress(Architecture* arch, ExprId addr); @@ -2182,6 +2183,11 @@ namespace BinaryNinja RegisterValue GetSSAFlagValue(uint32_t flag, size_t idx); RegisterValue GetExprValue(size_t expr); + + Ref GetMediumLevelIL() const; + Ref GetMappedMediumLevelIL() const; + size_t GetMappedMediumLevelILInstructionIndex(size_t instr) const; + size_t GetMappedMediumLevelILExprIndex(size_t expr) const; }; struct MediumLevelILLabel: public BNMediumLevelILLabel @@ -2236,6 +2242,7 @@ namespace BinaryNinja BNMediumLevelILInstruction operator[](size_t i) const; size_t GetIndexForInstruction(size_t i) const; size_t GetInstructionCount() const; + size_t GetExprCount() const; void Finalize(); @@ -2259,6 +2266,13 @@ namespace BinaryNinja RegisterValue GetSSAVarValue(const BNILVariable& var, size_t idx); RegisterValue GetExprValue(size_t expr); + + size_t GetSSAVarIndexAtInstruction(const BNILVariable& var, size_t instr) const; + size_t GetSSAMemoryIndexAtInstruction(size_t instr) const; + + Ref GetLowLevelIL() const; + size_t GetLowLevelILInstructionIndex(size_t instr) const; + size_t GetLowLevelILExprIndex(size_t expr) const; }; class FunctionRecognizer -- cgit v1.3.1