Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
rihi committed Feb 28, 2024
1 parent 82c1899 commit ad19bbe
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
10 changes: 2 additions & 8 deletions decompile.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@ def decompile(self, function_ids: Collection[object] | None = None, task_options
if task_options is None:
task_options = Decompiler.create_options()

pipeline = DecompilerPipeline.from_strings(
task_options.getlist("pipeline.cfg_stages"),
task_options.getlist("pipeline.ast_stages")
)
pipeline = DecompilerPipeline.from_strings(task_options.getlist("pipeline.cfg_stages"), task_options.getlist("pipeline.ast_stages"))

tasks = []
for function_id in function_ids:
Expand All @@ -62,10 +59,7 @@ def decompile(self, function_ids: Collection[object] | None = None, task_options

code = self._backend.generate(tasks)

return Decompiler.Result(
tasks,
code
)
return Decompiler.Result(tasks, code)

@dataclass
class Result:
Expand Down
4 changes: 3 additions & 1 deletion decompiler/frontend/binaryninja/frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ def _get_binninja_function(self, function_identifier: object) -> binaryninja.fun
raise RuntimeError(f"BNinja frontend could not resolve function with identifier '{function_identifier}'")

if function.analysis_skipped:
raise RuntimeError(f"BNinja skipped function analysis for function '{function.name}' with reason '{function.analysis_skip_reason.name}'")
raise RuntimeError(
f"BNinja skipped function analysis for function '{function.name}' with reason '{function.analysis_skip_reason.name}'"
)

return function

Expand Down
1 change: 1 addition & 0 deletions decompiler/task.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module describing tasks to be handled by the decompiler pipleline."""

from dataclasses import dataclass, field
from typing import List

Expand Down

0 comments on commit ad19bbe

Please sign in to comment.