Skip to content

Commit

Permalink
Fix precise diff from BaseView change (angr#980)
Browse files Browse the repository at this point in the history
  • Loading branch information
mahaloz authored Apr 18, 2023
1 parent 2cd10c1 commit 712358b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions angrmanagement/plugins/precise_diffing/precisediff_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def _create_instance_from_binary(self, file_path: Path):
return recompilation_instance

def _create_revised_disassembly_view(self):
new_disass = DiffDisassemblyView(self.diff_instance, "center")
new_disass = DiffDisassemblyView(self.workspace, self.diff_instance, "center")
new_disass.category = "diff"
new_disass.base_caption = "Precise Diff"
self.current_revised_view = new_disass
Expand All @@ -144,7 +144,7 @@ def jump_to_in_revised_view(self, func):

# pylint:disable=unused-argument
def syncronize_with_original_disassembly_view(self, *args, **kwargs):
og_view = self.workspace._get_or_create_disassembly_view()
og_view = self.workspace._get_or_create_view("disassembly", DisassemblyView)
if not og_view:
return

Expand Down Expand Up @@ -175,5 +175,5 @@ def load_revised_binary_from_file(self, file_path: Path):
self.syncronize_with_original_disassembly_view()
self.workspace.view_manager.raise_view(self.current_revised_view)

original_disass_view = self.diff_instance.workspace._get_or_create_disassembly_view()
original_disass_view = self.diff_instance.workspace._get_or_create_view("disassembly", DisassemblyView)
self.current_revised_view.sync_with_state_object(original_disass_view.sync_state)

0 comments on commit 712358b

Please sign in to comment.