From 203717232e816d42973f05f1c9fbc950914d71dc Mon Sep 17 00:00:00 2001 From: Rusty Wagner Date: Tue, 23 Jul 2019 22:40:39 -0400 Subject: Early HLIL testing --- flowgraph.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'flowgraph.cpp') diff --git a/flowgraph.cpp b/flowgraph.cpp index 51a634b9..be7e498b 100644 --- a/flowgraph.cpp +++ b/flowgraph.cpp @@ -329,6 +329,12 @@ bool FlowGraph::IsMediumLevelILGraph() const } +bool FlowGraph::IsHighLevelILGraph() const +{ + return BNIsHighLevelILFlowGraph(m_object); +} + + Ref FlowGraph::GetLowLevelILFunction() const { BNLowLevelILFunction* func = BNGetFlowGraphLowLevelILFunction(m_object); @@ -347,6 +353,15 @@ Ref FlowGraph::GetMediumLevelILFunction() const } +Ref FlowGraph::GetHighLevelILFunction() const +{ + BNHighLevelILFunction* func = BNGetFlowGraphHighLevelILFunction(m_object); + if (!func) + return nullptr; + return new HighLevelILFunction(func); +} + + void FlowGraph::SetLowLevelILFunction(LowLevelILFunction* func) { BNSetFlowGraphLowLevelILFunction(m_object, func ? func->GetObject() : nullptr); @@ -359,6 +374,12 @@ void FlowGraph::SetMediumLevelILFunction(MediumLevelILFunction* func) } +void FlowGraph::SetHighLevelILFunction(HighLevelILFunction* func) +{ + BNSetFlowGraphHighLevelILFunction(m_object, func ? func->GetObject() : nullptr); +} + + void FlowGraph::Show(const string& title) { ShowGraphReport(title, this); -- cgit v1.3.1