From ea1c660175992dac6673135146f36b3221921f20 Mon Sep 17 00:00:00 2001 From: Zion Leonahenahe Basque Date: Thu, 29 Aug 2024 16:08:08 -0700 Subject: [PATCH] Add a flag for specifying the default function names in decis (#104) * Add a button to exclude defaults in Force Push * bump --- libbs/__init__.py | 2 +- libbs/api/decompiler_interface.py | 2 ++ libbs/decompilers/ghidra/interface.py | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libbs/__init__.py b/libbs/__init__.py index 6f08b21..5555703 100644 --- a/libbs/__init__.py +++ b/libbs/__init__.py @@ -1,4 +1,4 @@ -__version__ = "1.19.2" +__version__ = "1.20.0" import logging diff --git a/libbs/api/decompiler_interface.py b/libbs/api/decompiler_interface.py index 23608d3..4870524 100644 --- a/libbs/api/decompiler_interface.py +++ b/libbs/api/decompiler_interface.py @@ -43,6 +43,7 @@ def __init__( # these flags should mostly be unchanged when passed through subclasses name: str = "generic", qt_version: str = "PySide6", + default_func_prefix: str = "sub_", artifact_lifter: Optional[ArtifactLifter] = None, error_on_artifact_duplicates: bool = False, decompiler_available: bool = True, @@ -68,6 +69,7 @@ def __init__( self.type_parser = CTypeParser() self.supports_undo = supports_undo self.qt_version = qt_version + self.default_func_prefix = default_func_prefix self._error_on_artifact_duplicates = error_on_artifact_duplicates self.headless = headless diff --git a/libbs/decompilers/ghidra/interface.py b/libbs/decompilers/ghidra/interface.py index 55b50de..56d48b2 100644 --- a/libbs/decompilers/ghidra/interface.py +++ b/libbs/decompilers/ghidra/interface.py @@ -63,6 +63,7 @@ def __init__( name="ghidra", artifact_lifter=GhidraArtifactLifter(self), supports_undo=True, + default_func_prefix="FUN_", **kwargs )