Skip to content

Commit 26098ec

Browse files
committed
[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`.
1 parent 68a19bd commit 26098ec

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

python/scriptingprovider.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -897,14 +897,16 @@ def __init__(self, provider):
897897
self.input_ready_state = ScriptingProviderInputReadyState.ReadyForScriptExecution
898898
self.debugger_imported = False
899899
from binaryninja.settings import Settings
900+
settings = Settings()
901+
if settings.contains('corePlugins.view.sharedCache') and settings.get_bool('corePlugins.view.sharedCache'):
902+
from .sharedcache import SharedCacheController
900903
if os.environ.get('BN_STANDALONE_DEBUGGER'):
901904
# By the time this scriptingprovider.py file is imported, the user plugins are not loaded yet.
902905
# So `from debugger import DebuggerController` would not work.
903906
from debugger import DebuggerController
904907
self.DebuggerController = DebuggerController
905908
self.debugger_imported = True
906909
else:
907-
settings = Settings()
908910
if settings.contains('corePlugins.debugger') and settings.get_bool('corePlugins.debugger') and \
909911
(os.environ.get('BN_DISABLE_CORE_DEBUGGER') is None):
910912
from .debugger import DebuggerController

0 commit comments

Comments
 (0)