diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:04:10 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:04:10 +0000 |
| commit | 74a628f776edb588bff8f8f5cc16eac947c9d631 (patch) | |
| tree | dc32e010ac4902621e5a279bfeb48628f7f0e166 /source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp | |
| parent | afed7be32164a598f8172282c249af7266c48b46 (diff) | |
Diffstat (limited to 'source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp')
| -rw-r--r-- | source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp b/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp index a757bba70d16..6b2e675afaea 100644 --- a/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp +++ b/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp @@ -20,7 +20,7 @@ #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/State.h" -#include "lldb/Core/UUID.h" +#include "lldb/Utility/UUID.h" #include "lldb/Host/ConnectionFileDescriptor.h" #include "lldb/Host/Host.h" #include "lldb/Host/Symbols.h" @@ -39,6 +39,8 @@ #include "lldb/Target/Thread.h" #include "lldb/Utility/StringExtractor.h" +#include "llvm/Support/Threading.h" + #define USEC_PER_SEC 1000000 // Project includes @@ -516,8 +518,7 @@ bool ProcessKDP::UpdateThreadList(ThreadList &old_thread_list, ThreadList &new_thread_list) { // locker will keep a mutex locked until it goes out of scope Log *log(ProcessKDPLog::GetLogIfAllCategoriesSet(KDP_LOG_THREAD)); - if (log && log->GetMask().Test(KDP_LOG_VERBOSE)) - log->Printf("ProcessKDP::%s (pid = %" PRIu64 ")", __FUNCTION__, GetID()); + LLDB_LOGV(log, "pid = {0}", GetID()); // Even though there is a CPU mask, it doesn't mean we can see each CPU // individually, there is really only one. Lets call this thread 1. @@ -718,18 +719,14 @@ Error ProcessKDP::DoSignal(int signo) { } void ProcessKDP::Initialize() { - static std::once_flag g_once_flag; + static llvm::once_flag g_once_flag; - std::call_once(g_once_flag, []() { + llvm::call_once(g_once_flag, []() { PluginManager::RegisterPlugin(GetPluginNameStatic(), GetPluginDescriptionStatic(), CreateInstance, DebuggerInitialize); - Log::Callbacks log_callbacks = {ProcessKDPLog::DisableLog, - ProcessKDPLog::EnableLog, - ProcessKDPLog::ListLogCategories}; - - Log::RegisterLogChannel(ProcessKDP::GetPluginNameStatic(), log_callbacks); + ProcessKDPLog::Initialize(); }); } |
