From 3104042adab833e73a71738f57070ab881ade615 Mon Sep 17 00:00:00 2001 From: KyleMiles Date: Wed, 28 Sep 2022 18:21:13 -0400 Subject: Rename and move `Analysis/Database Merge Tool` to `File/Merge Databases`; Add API bindings for `BinaryView::GetDebugInfo()`, `BinaryView::ApplyDebugInfo()`, and `BinaryView::SetDebugInfo()`; Remove `analysis.experimental.parseDebugInfo` (in favor of `loader.debugInfoInternal` and `loader.debugInfoExternal`) --- python/debuginfo.py | 2 +- python/examples/debug_info.py | 2 +- python/examples/mappedview.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'python') diff --git a/python/debuginfo.py b/python/debuginfo.py index fc434bfd..153e450d 100644 --- a/python/debuginfo.py +++ b/python/debuginfo.py @@ -177,7 +177,7 @@ class DebugInfoParser(object, metaclass=_DebugInfoParserMetaClass): bn.debuginfo.DebugInfoParser.register("debug info parser", is_valid, parse_info) - :py:class:`DebugInfo` can then be automatically applied to valid binary views (via the "Parse and Apply Debug Info" setting), or manually fetched/applied as bellow:: + :py:class:`DebugInfo` will then be automatically applied to binary views that contain debug information (via the load setting `loader.debugInfoInternal`), binary views that provide valid external debug info files (`loader.debugInfoExternal`), or manually fetched/applied as below:: valid_parsers = bn.debuginfo.DebugInfoParser.get_parsers_for_view(bv) parser = valid_parsers[0] diff --git a/python/examples/debug_info.py b/python/examples/debug_info.py index 28175ba1..0dd25786 100755 --- a/python/examples/debug_info.py +++ b/python/examples/debug_info.py @@ -222,7 +222,7 @@ for p in bn.debuginfo.DebugInfoParser: print(f" {bn.debuginfo.DebugInfoParser[p.name].name}") # Test calling our `is_valid` callback -bv = bn.open_view(filename, options={"analysis.experimental.parseDebugInfo": False}) +bv = bn.open_view(filename, options={"loader.debugInfoInternal": False}) if parser.is_valid_for_view(bv): print("Parser is valid") else: diff --git a/python/examples/mappedview.py b/python/examples/mappedview.py index 645096f5..cfefa87a 100644 --- a/python/examples/mappedview.py +++ b/python/examples/mappedview.py @@ -53,7 +53,7 @@ class MappedView(BinaryView): def get_load_settings_for_data(cls, data): # This method is optional. If provided this is where the Load Settings for a BinaryViewType are specified. Binary Ninja provides # some default read-only load settings which are: - # ["loader.architecture", "loader.platform", "loader.entryPointOffset", "loader.imageBase", "loader.segments", "loader.sections"] + # ["loader.architecture", "loader.platform", "loader.entryPointOffset", "loader.imageBase", "loader.segments", "loader.sections", "loader.debugInfoInternal", "loader.debugInfoExternal"] # The default load settings are provided for consistency and convenience. # The default load settings are always generated with a read-only indication which is respected by the UI. # The read-only indication is a property that consists of a JSON name/value pair ("readOnly" : true). @@ -76,8 +76,8 @@ class MappedView(BinaryView): # Specify default load settings that can be overridden (from the UI). overrides = [ - "loader.architecture", "loader.platform", "loader.entryPointOffset", "loader.imageBase", "loader.segments", - "loader.sections" + "loader.architecture", "loader.platform", "loader.entryPointOffset", "loader.imageBase", + "loader.segments", "loader.sections", "loader.debugInfoInternal", "loader.debugInfoExternal" ] for override in overrides: if load_settings.contains(override): -- cgit v1.3.1