Skip to content

Commit

Permalink
Always attempt to use the Decompiler Clinic Cache (angr#719)
Browse files Browse the repository at this point in the history
  • Loading branch information
mahaloz authored Jul 22, 2022
1 parent fc843b1 commit 3f0c798
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions angrmanagement/ui/widgets/qdisasm_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,14 @@ def reload(self, old_infodock: Optional['InfoDock']=None):
scene = self.scene()

if self._disassembly_level is DisassemblyLevel.AIL:
self.disasm = self.workspace.instance.project.analyses.Clinic(
self._function_graph.function)
self._supergraph = to_ail_supergraph(self.disasm.graph)
func = self._function_graph.function
try:
# always check if decompiler has cached a clinic object first
self.disasm = self.workspace.instance.kb.structured_code[(func.addr, 'pseudocode')].clinic
except (KeyError, AttributeError):
self.disasm = self.workspace.instance.project.analyses.Clinic(func)

self._supergraph = to_ail_supergraph(self.disasm.cc_graph)
nodefunc = lambda n: n
branchfunc = lambda n: None
else:
Expand Down

0 comments on commit 3f0c798

Please sign in to comment.