summaryrefslogtreecommitdiff
path: root/python/highlevelil.py
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2021-10-27 07:33:08 -0400
committerPeter LaFosse <peter@vector35.com>2021-11-05 10:30:12 -0400
commit64797d7c23824a991fe6285a6a3bb0dcee2dd495 (patch)
treedd974f93a349a8486533f91c817f51ab9d8d8909 /python/highlevelil.py
parent2386158d10d402b7783ab6f1253f548d230896c8 (diff)
Add IL class heirarchy graph report
Diffstat (limited to 'python/highlevelil.py')
-rw-r--r--python/highlevelil.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/python/highlevelil.py b/python/highlevelil.py
index 0ae927e4..c8751c8f 100644
--- a/python/highlevelil.py
+++ b/python/highlevelil.py
@@ -37,6 +37,7 @@ from . import types
from . import highlight
from . import flowgraph
from . import variable
+from .interaction import show_graph_report
from .commonil import (ILInstruction, Call, Tailcall, Syscall, Comparison, Signed, UnaryOperation, BinaryOperation,
SSA, Phi, Loop, ControlFlow, Memory, Constant, Arithmetic, DoublePrecision, Terminal,
FloatingPoint)
@@ -261,6 +262,14 @@ class HighLevelILInstruction(ILInstruction):
HighLevelILOperation.HLIL_FCMP_UO: [("left", "expr"), ("right", "expr")]
}
+ @staticmethod
+ def show_hlil_hierarchy():
+ graph = flowgraph.FlowGraph()
+ nodes = {}
+ for instruction in ILInstruction.values():
+ instruction.add_subgraph(graph, nodes)
+ show_graph_report("HLIL Class Hierarchy Graph", graph)
+
@classmethod
def create(cls, func:'HighLevelILFunction', expr_index:ExpressionIndex, as_ast:bool=True, instr_index:Optional[InstructionIndex]=None) -> 'HighLevelILInstruction':
assert func.arch is not None, "Attempted to create IL instruction with function missing an Architecture"