diff --git a/lldb/source/Host/common/Host.cpp b/lldb/source/Host/common/Host.cpp index 01fada13fae53..fd5cc1d17da25 100644 --- a/lldb/source/Host/common/Host.cpp +++ b/lldb/source/Host/common/Host.cpp @@ -89,40 +89,11 @@ using namespace lldb; using namespace lldb_private; #if !defined(__APPLE__) -#if !defined(_WIN32) -#include -void Host::SystemLog(Severity severity, llvm::StringRef message) { - static llvm::once_flag g_openlog_once; - llvm::call_once(g_openlog_once, [] { - openlog("lldb", LOG_CONS | LOG_PID | LOG_NDELAY, LOG_USER); - }); - int level = LOG_DEBUG; - switch (severity) { - case lldb::eSeverityInfo: - level = LOG_INFO; - break; - case lldb::eSeverityWarning: - level = LOG_WARNING; - break; - case lldb::eSeverityError: - level = LOG_ERR; - break; - } - syslog(level, "%s", message.data()); -} -#else -void Host::SystemLog(Severity severity, llvm::StringRef message) { - switch (severity) { - case lldb::eSeverityInfo: - case lldb::eSeverityWarning: - llvm::outs() << message; - break; - case lldb::eSeverityError: - llvm::errs() << message; - break; - } -} -#endif +// The system log is currently only meaningful on Darwin, where this means +// os_log. The meaning of a "system log" isn't as clear on other platforms, and +// therefore we don't providate a default implementation. Vendors are free to +// to implement this function if they have a use for it. +void Host::SystemLog(Severity severity, llvm::StringRef message) {} #endif #if !defined(__APPLE__) && !defined(_WIN32) diff --git a/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp b/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp index a69c10081ff19..790b8658e5263 100644 --- a/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp +++ b/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp @@ -191,6 +191,7 @@ const char *TargetThreadWindows::GetName() { if (SUCCEEDED(GetThreadDescription( m_host_thread.GetNativeThread().GetSystemHandle(), &pszThreadName))) { LLDB_LOGF(log, "GetThreadDescription: %ls", pszThreadName); + m_name.clear(); llvm::convertUTF16ToUTF8String( llvm::ArrayRef(reinterpret_cast(pszThreadName), wcslen(pszThreadName) * sizeof(wchar_t)),