[Lldb-commits] [PATCH] D68258: [Windows] Introduce a switch for the `lldb-server` mode on Windows
Aleksandr Urakov via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Oct 10 05:23:16 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rG0891366571b2: [Windows] Introduce a switch for the `lldb-server` mode on Windows (authored by aleksandr.urakov).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68258/new/
https://reviews.llvm.org/D68258
Files:
lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
Index: lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
===================================================================
--- lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
+++ lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
@@ -81,13 +81,24 @@
return ProcessSP(new ProcessWindows(target_sp, listener_sp));
}
-void ProcessWindows::Initialize() {
- static llvm::once_flag g_once_flag;
+static bool ShouldUseLLDBServer() {
+ llvm::StringRef use_lldb_server = ::getenv("LLDB_USE_LLDB_SERVER");
+ return use_lldb_server.equals_lower("on") ||
+ use_lldb_server.equals_lower("yes") ||
+ use_lldb_server.equals_lower("1") ||
+ use_lldb_server.equals_lower("true");
+}
- llvm::call_once(g_once_flag, []() {
- PluginManager::RegisterPlugin(GetPluginNameStatic(),
- GetPluginDescriptionStatic(), CreateInstance);
- });
+void ProcessWindows::Initialize() {
+ if (!ShouldUseLLDBServer()) {
+ static llvm::once_flag g_once_flag;
+
+ llvm::call_once(g_once_flag, []() {
+ PluginManager::RegisterPlugin(GetPluginNameStatic(),
+ GetPluginDescriptionStatic(),
+ CreateInstance);
+ });
+ }
}
void ProcessWindows::Terminate() {}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68258.224320.patch
Type: text/x-patch
Size: 1317 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191010/6b0625b2/attachment.bin>
More information about the lldb-commits
mailing list