diff options
| author | Jordan Wiens <github@psifertex.com> | 2019-07-22 17:49:03 -0400 |
|---|---|---|
| committer | Jordan Wiens <github@psifertex.com> | 2019-07-22 17:49:03 -0400 |
| commit | d4fa2fa1d657ced48dd00d64d44dcc2cd621ae01 (patch) | |
| tree | aa88057388d147865bcb66554c3104a39490b37f | |
| parent | 0736fc2a1f9590c110bf0add9c7651ac4e6e8919 (diff) | |
allow launching without loading user plugins
| -rw-r--r-- | binaryninjaapi.cpp | 12 | ||||
| -rw-r--r-- | binaryninjaapi.h | 2 | ||||
| -rw-r--r-- | binaryninjacore.h | 2 | ||||
| -rw-r--r-- | docs/guide/troubleshooting.md | 4 |
4 files changed, 20 insertions, 0 deletions
diff --git a/binaryninjaapi.cpp b/binaryninjaapi.cpp index 5dcc3ad1..d52c6c2d 100644 --- a/binaryninjaapi.cpp +++ b/binaryninjaapi.cpp @@ -30,6 +30,18 @@ struct WorkerThreadActionContext }; +void BinaryNinja::DisablePlugins() +{ + BNDisablePlugins(); +} + + +bool BinaryNinja::IsPluginsEnabled() +{ + return BNIsPluginsEnabled(); +} + + void BinaryNinja::InitCorePlugins() { BNInitCorePlugins(); diff --git a/binaryninjaapi.h b/binaryninjaapi.h index 23020d5e..dacb5a84 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -614,6 +614,8 @@ namespace BinaryNinja std::string& output, std::string& errors, const std::vector<std::string>& includeDirs = std::vector<std::string>()); + void DisablePlugins(); + bool IsPluginsEnabled(); void InitCorePlugins(); void InitUserPlugins(); void InitRepoPlugins(); diff --git a/binaryninjacore.h b/binaryninjacore.h index d460166c..23e14106 100644 --- a/binaryninjacore.h +++ b/binaryninjacore.h @@ -2037,6 +2037,8 @@ extern "C" // Plugin initialization BINARYNINJACOREAPI void BNInitCorePlugins(void); + BINARYNINJACOREAPI void BNDisablePlugins(void); + BINARYNINJACOREAPI bool BNIsPluginsEnabled(void); BINARYNINJACOREAPI void BNInitUserPlugins(void); BINARYNINJACOREAPI void BNInitRepoPlugins(void); diff --git a/docs/guide/troubleshooting.md b/docs/guide/troubleshooting.md index 0c43bd25..c14feef5 100644 --- a/docs/guide/troubleshooting.md +++ b/docs/guide/troubleshooting.md @@ -22,6 +22,10 @@ Alternatively, it might be easier to save debug logs to a file instead: (note that both long and short-form of the command-line arguments are demonstrated in the above examples) +## Disabling Plugins + +Disabling plugins can be a quick way to diagnose whether some unexpected behavior is casued by Binary Ninja itself or a plugin. Simply launch the process with the extra command-lien option `-p` to disable all user plugins at load time. + ## Plugin Troubleshooting While third party plugins are not officially supported, there are a number of troubleshooting tips that can help identify the cause. The most important is to enable debug logging as suggested in the previous section. This will often highlight problems with python paths or any other issues that prevent plugins from running. |
