diff options
| author | Rusty Wagner <rusty@vector35.com> | 2018-04-02 23:30:56 -0400 |
|---|---|---|
| committer | Rusty Wagner <rusty@vector35.com> | 2018-04-02 23:31:59 -0400 |
| commit | fa716fe2da53a4f136380b1f60197bd197b2793a (patch) | |
| tree | 9a8baea24f8d40072e75f33f76900fde5ee473fc /functiongraph.cpp | |
| parent | 5055d38ef59c570d21dcb6ce6855961e270f1042 (diff) | |
Add plugin commands for LLIL and MLIL
Diffstat (limited to 'functiongraph.cpp')
| -rw-r--r-- | functiongraph.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/functiongraph.cpp b/functiongraph.cpp index a743254e..9948d70e 100644 --- a/functiongraph.cpp +++ b/functiongraph.cpp @@ -186,3 +186,39 @@ void FunctionGraph::SetOption(BNDisassemblyOption option, bool state) { BNSetFunctionGraphOption(m_graph, option, state); } + + +bool FunctionGraph::IsILGraph() const +{ + return BNIsILFunctionGraph(m_graph); +} + + +bool FunctionGraph::IsLowLevelILGraph() const +{ + return BNIsLowLevelILFunctionGraph(m_graph); +} + + +bool FunctionGraph::IsMediumLevelILGraph() const +{ + return BNIsMediumLevelILFunctionGraph(m_graph); +} + + +Ref<LowLevelILFunction> FunctionGraph::GetLowLevelILFunction() const +{ + BNLowLevelILFunction* func = BNGetFunctionGraphLowLevelILFunction(m_graph); + if (!func) + return nullptr; + return new LowLevelILFunction(func); +} + + +Ref<MediumLevelILFunction> FunctionGraph::GetMediumLevelILFunction() const +{ + BNMediumLevelILFunction* func = BNGetFunctionGraphMediumLevelILFunction(m_graph); + if (!func) + return nullptr; + return new MediumLevelILFunction(func); +} |
