Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Commit

Permalink
Fix external debug file import
Browse files Browse the repository at this point in the history
  • Loading branch information
ElykDeer committed Nov 22, 2021
1 parent c4036d3 commit 72f6be0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# DWARF Import (v1.1.0)
# DWARF Import (v1.1.1)
Author: **Vector 35 Inc**

_Imports DWARF Info from ELFs_
Expand Down
11 changes: 6 additions & 5 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,16 @@


class DWARF_loader(bn.BackgroundTaskThread):
def __init__(self, bv, file):
def __init__(self, bv, debug_file=None):
bn.BackgroundTaskThread.__init__(self)
self.view = bv
self.file = file
self.debug_file = debug_file
self.progress = ""

def run(self):
# Open the binary.
analysis_session = AnalysisSession(binary_view = self.view)
analysis_session = AnalysisSession(binary_view = self.view, debug_file = self.debug_file)

if analysis_session.binary_view is None or analysis_session.binary_view.arch is None:
bn.log.log_error("Unable to import dwarf")

Expand All @@ -53,7 +54,7 @@ def load_symbols(bv):
return
except KeyError:
bv.store_metadata("dwarf_info_applied", True)
DWARF_loader(bv, bv.file).start()
DWARF_loader(bv).start()


def load_symbols_from_file(bv):
Expand All @@ -71,7 +72,7 @@ def load_symbols_from_file(bv):
bn.log.log_error(f"Input file `{file_choice.result}` does not exist")
return

DWARF_loader(bv, bn.filemetadata.FileMetadata(file_choice.result)).start()
DWARF_loader(bv, file_choice.result).start()


def is_valid(bv):
Expand Down
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"pyelftools>=0.27"
]
},
"version": "1.1.0",
"version": "1.1.1",
"author": "Vector 35 Inc",
"minimumbinaryninjaversion": 3000
}

0 comments on commit 72f6be0

Please sign in to comment.