forked from qt-creator/qt-creator
lldb: Set environment variable to detect when running lldb from Creator
Instead of relying on __name__ being 'lldbbridge', which can also be the case if the lldbbridge.py script is imported into a plain LLDB process, we can now look at the environment variable. This also lets us break out early from __lldb_init_module if the user has a `command script import llbdbridge.py` in their .lldbinit, or is automatically loading the bridge via the Qt Core debug script. Change-Id: Id8168c692ef66ce50119b7426ca85c7bc99d9503 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -179,6 +179,7 @@ void LldbEngine::setupEngine()
|
||||
|
||||
showMessage("STARTING LLDB: " + lldbCmd.toUserOutput());
|
||||
Environment environment = runParameters().debugger.environment;
|
||||
environment.appendOrSet("QT_CREATOR_LLDB_PROCESS", "1");
|
||||
environment.appendOrSet("PYTHONUNBUFFERED", "1"); // avoid flushing problem on macOS
|
||||
DebuggerItem::addAndroidLldbPythonEnv(lldbCmd, environment);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user