summaryrefslogtreecommitdiff
path: root/python/scriptingprovider.py
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2025-04-16 16:19:18 -0400
committerMason Reed <mason@vector35.com>2025-04-16 17:59:18 -0400
commit26098ec46390bf206b773d7de0558be5d6bd0c07 (patch)
tree66dea46b2e5a823680f66b56c3360c33cb8cd75a /python/scriptingprovider.py
parent68a19bde6ba17c1c5efabcfa0b30e4f8d295116f (diff)
[SharedCache] Import the shared cache magic variables in the scripting console
Similar to how the debugger imports its magic variables. Magic variables available: `dsc` and `shared_cache`.
Diffstat (limited to 'python/scriptingprovider.py')
-rw-r--r--python/scriptingprovider.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/python/scriptingprovider.py b/python/scriptingprovider.py
index 74102dc2..92f2b4f5 100644
--- a/python/scriptingprovider.py
+++ b/python/scriptingprovider.py
@@ -897,6 +897,9 @@ from binaryninja import *
self.input_ready_state = ScriptingProviderInputReadyState.ReadyForScriptExecution
self.debugger_imported = False
from binaryninja.settings import Settings
+ settings = Settings()
+ if settings.contains('corePlugins.view.sharedCache') and settings.get_bool('corePlugins.view.sharedCache'):
+ from .sharedcache import SharedCacheController
if os.environ.get('BN_STANDALONE_DEBUGGER'):
# By the time this scriptingprovider.py file is imported, the user plugins are not loaded yet.
# So `from debugger import DebuggerController` would not work.
@@ -904,7 +907,6 @@ from binaryninja import *
self.DebuggerController = DebuggerController
self.debugger_imported = True
else:
- settings = Settings()
if settings.contains('corePlugins.debugger') and settings.get_bool('corePlugins.debugger') and \
(os.environ.get('BN_DISABLE_CORE_DEBUGGER') is None):
from .debugger import DebuggerController