summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/ThreadSpec.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Target/ThreadSpec.cpp')
-rw-r--r--lldb/source/Target/ThreadSpec.cpp58
1 files changed, 58 insertions, 0 deletions
diff --git a/lldb/source/Target/ThreadSpec.cpp b/lldb/source/Target/ThreadSpec.cpp
new file mode 100644
index 00000000000..5d1089188fe
--- /dev/null
+++ b/lldb/source/Target/ThreadSpec.cpp
@@ -0,0 +1,58 @@
+//===-- ThreadSpec.cpp ----------------------------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "lldb/Target/Thread.h"
+#include "lldb/Target/ThreadSpec.h"
+
+using namespace lldb;
+using namespace lldb_private;
+
+ThreadSpec::ThreadSpec() :
+ m_index (-1),
+ m_tid (LLDB_INVALID_THREAD_ID),
+ m_name(),
+ m_queue_name ()
+{
+}
+
+ThreadSpec::ThreadSpec (const ThreadSpec &rhs) :
+ m_index(rhs.m_index),
+ m_tid(rhs.m_tid),
+ m_name(rhs.m_name),
+ m_queue_name(rhs.m_queue_name)
+{
+}
+
+const ThreadSpec &
+ThreadSpec::operator=(const ThreadSpec &rhs)
+{
+ m_index = rhs.m_index;
+ m_tid = rhs.m_tid;
+ m_name = rhs.m_name;
+ m_queue_name = rhs.m_queue_name;
+ return *this;
+}
+
+const char *
+ThreadSpec::GetName () const
+{
+ if (m_name.empty())
+ return NULL;
+ else
+ return m_name.c_str();
+}
+
+const char *
+ThreadSpec::GetQueueName () const
+{
+ if (m_queue_name.empty())
+ return NULL;
+ else
+ return m_queue_name.c_str();
+}
OpenPOWER on IntegriCloud