Add a "thread specification" class that specifies thread specific breakpoints by name, index, queue or TID.
Push this through all the breakpoint management code. Allow this to be set when the breakpoint is created.
Fix the Process classes so that a breakpoint hit that is not for a particular thread is not reported as a
breakpoint hit event for that thread.
Added a "breakpoint configure" command to allow you to reset any of the thread
specific options (or the ignore count.)
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@106078 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Target/ThreadSpec.cpp b/source/Target/ThreadSpec.cpp
new file mode 100644
index 0000000..5d10891
--- /dev/null
+++ b/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();
+}