summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--binaryninjaapi.h1
-rw-r--r--binaryninjacore.h1
-rw-r--r--lowlevelil.cpp6
-rw-r--r--python/lowlevelil.py8
4 files changed, 16 insertions, 0 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h
index 62dd4a28..ea67f459 100644
--- a/binaryninjaapi.h
+++ b/binaryninjaapi.h
@@ -3999,6 +3999,7 @@ __attribute__ ((format (printf, 1, 2)))
BNLowLevelILLabel* GetLabelForAddress(Architecture* arch, ExprId addr);
void Finalize();
+ void GenerateSSAForm();
bool GetExprText(Architecture* arch, ExprId expr, std::vector<InstructionTextToken>& tokens);
bool GetInstructionText(Function* func, Architecture* arch, size_t i,
diff --git a/binaryninjacore.h b/binaryninjacore.h
index b12da5e2..c954b445 100644
--- a/binaryninjacore.h
+++ b/binaryninjacore.h
@@ -4125,6 +4125,7 @@ __attribute__ ((format (printf, 1, 2)))
BINARYNINJACOREAPI void BNLowLevelILInitLabel(BNLowLevelILLabel* label);
BINARYNINJACOREAPI void BNLowLevelILMarkLabel(BNLowLevelILFunction* func, BNLowLevelILLabel* label);
BINARYNINJACOREAPI void BNFinalizeLowLevelILFunction(BNLowLevelILFunction* func);
+ BINARYNINJACOREAPI void BNGenerateLowLevelILSSAForm(BNLowLevelILFunction* func);
BINARYNINJACOREAPI void BNPrepareToCopyLowLevelILFunction(BNLowLevelILFunction* func, BNLowLevelILFunction* src);
BINARYNINJACOREAPI void BNPrepareToCopyLowLevelILBasicBlock(BNLowLevelILFunction* func, BNBasicBlock* block);
diff --git a/lowlevelil.cpp b/lowlevelil.cpp
index 4dc113e0..97abe279 100644
--- a/lowlevelil.cpp
+++ b/lowlevelil.cpp
@@ -432,6 +432,12 @@ void LowLevelILFunction::Finalize()
}
+void LowLevelILFunction::GenerateSSAForm()
+{
+ BNGenerateLowLevelILSSAForm(m_object);
+}
+
+
bool LowLevelILFunction::GetExprText(Architecture* arch, ExprId expr, vector<InstructionTextToken>& tokens)
{
size_t count;
diff --git a/python/lowlevelil.py b/python/lowlevelil.py
index a8814d8e..f374cd13 100644
--- a/python/lowlevelil.py
+++ b/python/lowlevelil.py
@@ -3031,6 +3031,14 @@ class LowLevelILFunction(object):
"""
core.BNFinalizeLowLevelILFunction(self.handle)
+ def generate_ssa_form(self):
+ """
+ ``generate_ssa_form`` generate SSA form given the current LLIL
+
+ :rtype: None
+ """
+ core.BNGenerateLowLevelILSSAForm(self.handle)
+
def add_label_for_address(self, arch, addr):
"""
``add_label_for_address`` adds a low-level IL label for the given architecture ``arch`` at the given virtual