summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/lldb/source/API/SBBreakpoint.cpp
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2015-02-06 22:25:21 +0000
committeremaste <emaste@FreeBSD.org>2015-02-06 22:25:21 +0000
commitfa0e7b41694bc598cd3df2405d0384ea29d7537e (patch)
tree5e5b6a0774e0d93bb4cfa2f9f83b9c41b38c4448 /contrib/llvm/tools/lldb/source/API/SBBreakpoint.cpp
parentd2b9c88b24f95cd9f8e7bd621cfa454ce759c687 (diff)
parent0c2019f4ca6b2dc6d710f6bb16a0e3ed10271531 (diff)
downloadFreeBSD-src-fa0e7b41694bc598cd3df2405d0384ea29d7537e.zip
FreeBSD-src-fa0e7b41694bc598cd3df2405d0384ea29d7537e.tar.gz
Update LLDB snapshot to upstream r225923 (git 2b588ecd)
Sponsored by: DARPA, AFRL
Diffstat (limited to 'contrib/llvm/tools/lldb/source/API/SBBreakpoint.cpp')
-rw-r--r--contrib/llvm/tools/lldb/source/API/SBBreakpoint.cpp78
1 files changed, 78 insertions, 0 deletions
diff --git a/contrib/llvm/tools/lldb/source/API/SBBreakpoint.cpp b/contrib/llvm/tools/lldb/source/API/SBBreakpoint.cpp
index a950ca9..dd4c80c 100644
--- a/contrib/llvm/tools/lldb/source/API/SBBreakpoint.cpp
+++ b/contrib/llvm/tools/lldb/source/API/SBBreakpoint.cpp
@@ -13,6 +13,7 @@
#include "lldb/API/SBEvent.h"
#include "lldb/API/SBProcess.h"
#include "lldb/API/SBStream.h"
+#include "lldb/API/SBStringList.h"
#include "lldb/API/SBThread.h"
#include "lldb/Breakpoint/Breakpoint.h"
@@ -653,6 +654,83 @@ SBBreakpoint::SetScriptCallbackBody (const char *callback_body_text)
return sb_error;
}
+bool
+SBBreakpoint::AddName (const char *new_name)
+{
+ Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
+
+ if (log)
+ log->Printf ("SBBreakpoint(%p)::AddName (name=%s)",
+ static_cast<void*>(m_opaque_sp.get()),
+ new_name);
+
+ if (m_opaque_sp)
+ {
+ Mutex::Locker api_locker (m_opaque_sp->GetTarget().GetAPIMutex());
+ Error error; // Think I'm just going to swallow the error here, it's probably more annoying to have to provide it.
+ return m_opaque_sp->AddName(new_name, error);
+ }
+
+ return false;
+}
+
+void
+SBBreakpoint::RemoveName (const char *name_to_remove)
+{
+ Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
+
+ if (log)
+ log->Printf ("SBBreakpoint(%p)::RemoveName (name=%s)",
+ static_cast<void*>(m_opaque_sp.get()),
+ name_to_remove);
+
+ if (m_opaque_sp)
+ {
+ Mutex::Locker api_locker (m_opaque_sp->GetTarget().GetAPIMutex());
+ m_opaque_sp->RemoveName(name_to_remove);
+ }
+}
+
+bool
+SBBreakpoint::MatchesName (const char *name)
+{
+ Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
+
+ if (log)
+ log->Printf ("SBBreakpoint(%p)::MatchesName (name=%s)",
+ static_cast<void*>(m_opaque_sp.get()),
+ name);
+
+ if (m_opaque_sp)
+ {
+ Mutex::Locker api_locker (m_opaque_sp->GetTarget().GetAPIMutex());
+ return m_opaque_sp->MatchesName(name);
+ }
+
+ return false;
+}
+
+void
+SBBreakpoint::GetNames (SBStringList &names)
+{
+ Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
+
+ if (log)
+ log->Printf ("SBBreakpoint(%p)::GetNames ()",
+ static_cast<void*>(m_opaque_sp.get()));
+
+ if (m_opaque_sp)
+ {
+ Mutex::Locker api_locker (m_opaque_sp->GetTarget().GetAPIMutex());
+ std::vector<std::string> names_vec;
+ m_opaque_sp->GetNames(names_vec);
+ for (std::string name : names_vec)
+ {
+ names.AppendString (name.c_str());
+ }
+ }
+}
+
lldb_private::Breakpoint *
SBBreakpoint::operator->() const
{
OpenPOWER on IntegriCloud