summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBBreakpoint.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/API/SBBreakpoint.cpp')
-rw-r--r--lldb/source/API/SBBreakpoint.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/lldb/source/API/SBBreakpoint.cpp b/lldb/source/API/SBBreakpoint.cpp
index 8be67046ef4..b0b1e2a042b 100644
--- a/lldb/source/API/SBBreakpoint.cpp
+++ b/lldb/source/API/SBBreakpoint.cpp
@@ -234,6 +234,33 @@ SBBreakpoint::IsEnabled ()
return false;
}
+void
+SBBreakpoint::SetOneShot (bool one_shot)
+{
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
+
+ if (log)
+ log->Printf ("SBBreakpoint(%p)::SetOneShot (one_shot=%i)", m_opaque_sp.get(), one_shot);
+
+ if (m_opaque_sp)
+ {
+ Mutex::Locker api_locker (m_opaque_sp->GetTarget().GetAPIMutex());
+ m_opaque_sp->SetOneShot (one_shot);
+ }
+}
+
+bool
+SBBreakpoint::IsOneShot () const
+{
+ if (m_opaque_sp)
+ {
+ Mutex::Locker api_locker (m_opaque_sp->GetTarget().GetAPIMutex());
+ return m_opaque_sp->IsOneShot();
+ }
+ else
+ return false;
+}
+
bool
SBBreakpoint::IsInternal ()
{
OpenPOWER on IntegriCloud