summaryrefslogtreecommitdiffstats
path: root/lldb/source/Breakpoint/BreakpointOptions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Breakpoint/BreakpointOptions.cpp')
-rw-r--r--lldb/source/Breakpoint/BreakpointOptions.cpp37
1 files changed, 27 insertions, 10 deletions
diff --git a/lldb/source/Breakpoint/BreakpointOptions.cpp b/lldb/source/Breakpoint/BreakpointOptions.cpp
index 4f664c4692f..695f4ee5ccd 100644
--- a/lldb/source/Breakpoint/BreakpointOptions.cpp
+++ b/lldb/source/Breakpoint/BreakpointOptions.cpp
@@ -16,6 +16,7 @@
#include "lldb/Core/Stream.h"
#include "lldb/Core/StringList.h"
#include "lldb/Breakpoint/StoppointCallbackContext.h"
+#include "lldb/Target/ThreadSpec.h"
using namespace lldb;
using namespace lldb_private;
@@ -35,7 +36,7 @@ BreakpointOptions::BreakpointOptions() :
m_callback_baton_sp (),
m_enabled (true),
m_ignore_count (0),
- m_thread_id (LLDB_INVALID_THREAD_ID)
+ m_thread_spec_ap (NULL)
{
}
@@ -48,8 +49,10 @@ BreakpointOptions::BreakpointOptions(const BreakpointOptions& rhs) :
m_callback_is_synchronous (rhs.m_callback_is_synchronous),
m_enabled (rhs.m_enabled),
m_ignore_count (rhs.m_ignore_count),
- m_thread_id (rhs.m_thread_id)
+ m_thread_spec_ap (NULL)
{
+ if (rhs.m_thread_spec_ap.get() != NULL)
+ m_thread_spec_ap.reset (new ThreadSpec(*rhs.m_thread_spec_ap.get()));
}
//----------------------------------------------------------------------
@@ -63,7 +66,8 @@ BreakpointOptions::operator=(const BreakpointOptions& rhs)
m_callback_is_synchronous = rhs.m_callback_is_synchronous;
m_enabled = rhs.m_enabled;
m_ignore_count = rhs.m_ignore_count;
- m_thread_id = rhs.m_thread_id;
+ if (rhs.m_thread_spec_ap.get() != NULL)
+ m_thread_spec_ap.reset(new ThreadSpec(*rhs.m_thread_spec_ap.get()));
return *this;
}
@@ -98,6 +102,12 @@ BreakpointOptions::GetBaton ()
return m_callback_baton_sp.get();
}
+const Baton *
+BreakpointOptions::GetBaton () const
+{
+ return m_callback_baton_sp.get();
+}
+
bool
BreakpointOptions::InvokeCallback (StoppointCallbackContext *context,
lldb::user_id_t break_id,
@@ -141,19 +151,26 @@ BreakpointOptions::SetIgnoreCount (int32_t n)
m_ignore_count = n;
}
-void
-BreakpointOptions::SetThreadID (lldb::tid_t thread_id)
+const ThreadSpec *
+BreakpointOptions::GetThreadSpec () const
{
- m_thread_id = thread_id;
+ return m_thread_spec_ap.get();
}
-lldb::tid_t
-BreakpointOptions::GetThreadID () const
+ThreadSpec *
+BreakpointOptions::GetThreadSpec ()
{
- return m_thread_id;
+ if (m_thread_spec_ap.get() == NULL)
+ m_thread_spec_ap.reset (new ThreadSpec());
+
+ return m_thread_spec_ap.get();
}
-
+void
+BreakpointOptions::SetThreadID (lldb::tid_t thread_id)
+{
+ GetThreadSpec()->SetTID(thread_id);
+}
void
BreakpointOptions::CommandBaton::GetDescription (Stream *s, lldb::DescriptionLevel level) const
OpenPOWER on IntegriCloud