stella.stamenova created this revision.
stella.stamenova added reviewers: JDevlieghere, clayborg, labath.
stella.stamenova requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
The current default is to not use lldb-server on Windows, however, lldb-server
is more stable than ProcessWindows, so default to using lldb-server.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D117581
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
@@ -79,17 +79,16 @@
ProcessSP ProcessWindows::CreateInstance(lldb::TargetSP target_sp,
lldb::ListenerSP listener_sp,
- const FileSpec *,
- bool can_connect) {
+ const FileSpec *, bool can_connect) {
return ProcessSP(new ProcessWindows(target_sp, listener_sp));
}
static bool ShouldUseLLDBServer() {
llvm::StringRef use_lldb_server = ::getenv("LLDB_USE_LLDB_SERVER");
- return use_lldb_server.equals_insensitive("on") ||
- use_lldb_server.equals_insensitive("yes") ||
- use_lldb_server.equals_insensitive("1") ||
- use_lldb_server.equals_insensitive("true");
+ return !use_lldb_server.equals_insensitive("off") &&
+ !use_lldb_server.equals_insensitive("no") &&
+ !use_lldb_server.equals_insensitive("0") &&
+ !use_lldb_server.equals_insensitive("false");
}
void ProcessWindows::Initialize() {
@@ -97,9 +96,8 @@
static llvm::once_flag g_once_flag;
llvm::call_once(g_once_flag, []() {
- PluginManager::RegisterPlugin(GetPluginNameStatic(),
- GetPluginDescriptionStatic(),
- CreateInstance);
+ PluginManager::RegisterPlugin(
+ GetPluginNameStatic(), GetPluginDescriptionStatic(), CreateInstance);
});
}
}
@@ -115,9 +113,8 @@
ProcessWindows::ProcessWindows(lldb::TargetSP target_sp,
lldb::ListenerSP listener_sp)
: lldb_private::Process(target_sp, listener_sp),
- m_watchpoint_ids(
- RegisterContextWindows::GetNumHardwareBreakpointSlots(),
- LLDB_INVALID_BREAK_ID) {}
+ m_watchpoint_ids(RegisterContextWindows::GetNumHardwareBreakpointSlots(),
+ LLDB_INVALID_BREAK_ID) {}
ProcessWindows::~ProcessWindows() {}
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
@@ -79,17 +79,16 @@
ProcessSP ProcessWindows::CreateInstance(lldb::TargetSP target_sp,
lldb::ListenerSP listener_sp,
- const FileSpec *,
- bool can_connect) {
+ const FileSpec *, bool can_connect) {
return ProcessSP(new ProcessWindows(target_sp, listener_sp));
}
static bool ShouldUseLLDBServer() {
llvm::StringRef use_lldb_server = ::getenv("LLDB_USE_LLDB_SERVER");
- return use_lldb_server.equals_insensitive("on") ||
- use_lldb_server.equals_insensitive("yes") ||
- use_lldb_server.equals_insensitive("1") ||
- use_lldb_server.equals_insensitive("true");
+ return !use_lldb_server.equals_insensitive("off") &&
+ !use_lldb_server.equals_insensitive("no") &&
+ !use_lldb_server.equals_insensitive("0") &&
+ !use_lldb_server.equals_insensitive("false");
}
void ProcessWindows::Initialize() {
@@ -97,9 +96,8 @@
static llvm::once_flag g_once_flag;
llvm::call_once(g_once_flag, []() {
- PluginManager::RegisterPlugin(GetPluginNameStatic(),
- GetPluginDescriptionStatic(),
- CreateInstance);
+ PluginManager::RegisterPlugin(
+ GetPluginNameStatic(), GetPluginDescriptionStatic(), CreateInstance);
});
}
}
@@ -115,9 +113,8 @@
ProcessWindows::ProcessWindows(lldb::TargetSP target_sp,
lldb::ListenerSP listener_sp)
: lldb_private::Process(target_sp, listener_sp),
- m_watchpoint_ids(
- RegisterContextWindows::GetNumHardwareBreakpointSlots(),
- LLDB_INVALID_BREAK_ID) {}
+ m_watchpoint_ids(RegisterContextWindows::GetNumHardwareBreakpointSlots(),
+ LLDB_INVALID_BREAK_ID) {}
ProcessWindows::~ProcessWindows() {}
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits