diff options
| -rw-r--r-- | docs/guide/troubleshooting.md | 2 | ||||
| -rw-r--r-- | exceptions.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/docs/guide/troubleshooting.md b/docs/guide/troubleshooting.md index f0c245a9..52d8bb90 100644 --- a/docs/guide/troubleshooting.md +++ b/docs/guide/troubleshooting.md @@ -209,7 +209,7 @@ The following environment variables may be helpful when troubleshooting issues: | BN_DISABLE_USER_SETTINGS | Flag (True if exists) | This flag will cause Binary Ninja to ignore any [`settings.json`](https://docs.binary.ninja/guide/settings.html).| | BN_SCREENSHOT | Flag (True if exists) | This flag removes some small UI clutter to enable cleaner screenshots. | | BN_DEBUG_HTTP | Flag (True if exists) | This flag enables additional debug logging of HTTP activity. | -| BN_DEBUG_EXCEPTION_TRACES | Flag (True if exists) | This variable includes stack traces when exceptions are handled (MacOS and Linux only). | +| BN_DEBUG_EXCEPTION_TRACES | Flag (Enabled by default, disabled if set to "0") | This variable includes stack traces when exceptions are handled (MacOS and Linux only). | | BN_DEBUG_CLANG | Flag (True if exists) | If set, this flag adds additional debugging information to stdout from clang type parsing. | diff --git a/exceptions.cpp b/exceptions.cpp index bdc1db2c..55a5e97f 100644 --- a/exceptions.cpp +++ b/exceptions.cpp @@ -26,7 +26,7 @@ BinaryNinja::ExceptionWithStackTrace::ExceptionWithStackTrace(const std::string& { m_originalMessage = message; m_message = message; - if (getenv("BN_DEBUG_EXCEPTION_TRACES")) + if (auto var = getenv("BN_DEBUG_EXCEPTION_TRACES"); !var || var[0] != '0') { char* stackTrace = BNGetCurrentStackTraceString(); if (stackTrace) @@ -88,7 +88,7 @@ BinaryNinja::ExceptionWithStackTrace::ExceptionWithStackTrace(std::exception_ptr m_message = "Some unknown exception"; } } - if (getenv("BN_DEBUG_EXCEPTION_TRACES")) + if (auto var = getenv("BN_DEBUG_EXCEPTION_TRACES"); !var || var[0] != '0') { char* stackTrace = BNGetCurrentStackTraceString(); if (stackTrace) |
