diff options
Diffstat (limited to 'lldb/source/API')
-rw-r--r-- | lldb/source/API/SBBreakpoint.cpp | 16 | ||||
-rw-r--r-- | lldb/source/API/SBBreakpointLocation.cpp | 22 | ||||
-rw-r--r-- | lldb/source/API/SBProcess.cpp | 5 |
3 files changed, 28 insertions, 15 deletions
diff --git a/lldb/source/API/SBBreakpoint.cpp b/lldb/source/API/SBBreakpoint.cpp index 33bdbe0b472..6b8ac6ede0a 100644 --- a/lldb/source/API/SBBreakpoint.cpp +++ b/lldb/source/API/SBBreakpoint.cpp @@ -557,6 +557,13 @@ SBBreakpoint::operator *() const return m_opaque_sp; } +bool +SBBreakpoint::EventIsBreakpointEvent (const lldb::SBEvent &event) +{ + return Breakpoint::BreakpointEventData::GetEventDataFromEvent(event.get()) != NULL; + +} + BreakpointEventType SBBreakpoint::GetBreakpointEventTypeFromEvent (const SBEvent& event) { @@ -583,4 +590,13 @@ SBBreakpoint::GetBreakpointLocationAtIndexFromEvent (const lldb::SBEvent& event, return sb_breakpoint_loc; } +uint32_t +SBBreakpoint::GetNumBreakpointLocationsFromEvent (const lldb::SBEvent &event) +{ + uint32_t num_locations = 0; + if (event.IsValid()) + num_locations = (Breakpoint::BreakpointEventData::GetNumBreakpointLocationsFromEvent (event.GetSP())); + return num_locations; +} + diff --git a/lldb/source/API/SBBreakpointLocation.cpp b/lldb/source/API/SBBreakpointLocation.cpp index 57cf5a1a5c7..d7fc1dc577d 100644 --- a/lldb/source/API/SBBreakpointLocation.cpp +++ b/lldb/source/API/SBBreakpointLocation.cpp @@ -176,9 +176,7 @@ SBBreakpointLocation::GetThreadID () if (m_opaque_sp) { Mutex::Locker api_locker (m_opaque_sp->GetBreakpoint().GetTarget().GetAPIMutex()); - const ThreadSpec *thread_spec = m_opaque_sp->GetLocationOptions()->GetThreadSpecNoCreate(); - if (thread_spec) - tid = thread_spec->GetTID(); + return m_opaque_sp->GetThreadID(); } return tid; } @@ -189,7 +187,7 @@ SBBreakpointLocation::SetThreadIndex (uint32_t index) if (m_opaque_sp) { Mutex::Locker api_locker (m_opaque_sp->GetBreakpoint().GetTarget().GetAPIMutex()); - m_opaque_sp->GetLocationOptions()->GetThreadSpec()->SetIndex (index); + m_opaque_sp->SetThreadIndex (index); } } @@ -200,9 +198,7 @@ SBBreakpointLocation::GetThreadIndex() const if (m_opaque_sp) { Mutex::Locker api_locker (m_opaque_sp->GetBreakpoint().GetTarget().GetAPIMutex()); - const ThreadSpec *thread_spec = m_opaque_sp->GetOptionsNoCreate()->GetThreadSpecNoCreate(); - if (thread_spec) - thread_idx = thread_spec->GetIndex(); + return m_opaque_sp->GetThreadIndex(); } return thread_idx; } @@ -214,7 +210,7 @@ SBBreakpointLocation::SetThreadName (const char *thread_name) if (m_opaque_sp) { Mutex::Locker api_locker (m_opaque_sp->GetBreakpoint().GetTarget().GetAPIMutex()); - m_opaque_sp->GetLocationOptions()->GetThreadSpec()->SetName (thread_name); + m_opaque_sp->SetThreadName (thread_name); } } @@ -224,9 +220,7 @@ SBBreakpointLocation::GetThreadName () const if (m_opaque_sp) { Mutex::Locker api_locker (m_opaque_sp->GetBreakpoint().GetTarget().GetAPIMutex()); - const ThreadSpec *thread_spec = m_opaque_sp->GetOptionsNoCreate()->GetThreadSpecNoCreate(); - if (thread_spec) - return thread_spec->GetName(); + return m_opaque_sp->GetThreadName(); } return NULL; } @@ -237,7 +231,7 @@ SBBreakpointLocation::SetQueueName (const char *queue_name) if (m_opaque_sp) { Mutex::Locker api_locker (m_opaque_sp->GetBreakpoint().GetTarget().GetAPIMutex()); - m_opaque_sp->GetLocationOptions()->GetThreadSpec()->SetQueueName (queue_name); + m_opaque_sp->SetQueueName (queue_name); } } @@ -247,9 +241,7 @@ SBBreakpointLocation::GetQueueName () const if (m_opaque_sp) { Mutex::Locker api_locker (m_opaque_sp->GetBreakpoint().GetTarget().GetAPIMutex()); - const ThreadSpec *thread_spec = m_opaque_sp->GetOptionsNoCreate()->GetThreadSpecNoCreate(); - if (thread_spec) - return thread_spec->GetQueueName(); + m_opaque_sp->GetQueueName (); } return NULL; } diff --git a/lldb/source/API/SBProcess.cpp b/lldb/source/API/SBProcess.cpp index 4b4e840e63d..5fc71966078 100644 --- a/lldb/source/API/SBProcess.cpp +++ b/lldb/source/API/SBProcess.cpp @@ -740,6 +740,11 @@ SBProcess::GetProcessFromEvent (const SBEvent &event) return process; } +bool +SBProcess::EventIsProcessEvent (const SBEvent &event) +{ + return Process::ProcessEventData::GetEventDataFromEvent(event.get()) != NULL; +} SBBroadcaster SBProcess::GetBroadcaster () const |