summaryrefslogtreecommitdiff
path: root/source/Core/Log.cpp
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2015-02-06 21:38:51 +0000
committerEd Maste <emaste@FreeBSD.org>2015-02-06 21:38:51 +0000
commit205afe679855a4ce8149cdaa94d3f0868ce796dc (patch)
tree09bc83f73246ee3c7a779605cd0122093d2a8a19 /source/Core/Log.cpp
parent0cac4ca3916ac24ab6139d03cbfd18db9e715bfe (diff)
Notes
Diffstat (limited to 'source/Core/Log.cpp')
-rw-r--r--source/Core/Log.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/Core/Log.cpp b/source/Core/Log.cpp
index 3adca6e5385c0..d205d363b764f 100644
--- a/source/Core/Log.cpp
+++ b/source/Core/Log.cpp
@@ -26,9 +26,12 @@
#include "lldb/Core/StreamFile.h"
#include "lldb/Core/StreamString.h"
#include "lldb/Host/Host.h"
-#include "lldb/Host/TimeValue.h"
#include "lldb/Host/Mutex.h"
+#include "lldb/Host/ThisThread.h"
+#include "lldb/Host/TimeValue.h"
#include "lldb/Interpreter/Args.h"
+
+#include "llvm/ADT/SmallString.h"
using namespace lldb;
using namespace lldb_private;
@@ -113,7 +116,8 @@ Log::PrintfWithFlagsVarArg (uint32_t flags, const char *format, va_list args)
// Add the thread name if requested
if (m_options.Test (LLDB_LOG_OPTION_PREPEND_THREAD_NAME))
{
- std::string thread_name (Host::GetThreadName (getpid(), Host::GetCurrentThreadID()));
+ llvm::SmallString<32> thread_name;
+ ThisThread::GetName(thread_name);
if (!thread_name.empty())
header.Printf ("%s ", thread_name.c_str());
}