summaryrefslogtreecommitdiff
path: root/scripts/Python/python-extensions.swig
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-12-18 20:12:36 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-12-18 20:12:36 +0000
commitef5d0b5e97ec8e6fa395d377b09aa7755e345b4f (patch)
tree27916256fdeeb57d10d2f3d6948be5d71a703215 /scripts/Python/python-extensions.swig
parent76e0736e7fcfeb179779e49c05604464b1ccd704 (diff)
Notes
Diffstat (limited to 'scripts/Python/python-extensions.swig')
-rw-r--r--scripts/Python/python-extensions.swig15
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/Python/python-extensions.swig b/scripts/Python/python-extensions.swig
index 693b06b9aab39..d79917b921589 100644
--- a/scripts/Python/python-extensions.swig
+++ b/scripts/Python/python-extensions.swig
@@ -71,6 +71,21 @@
}
}
+%extend lldb::SBBreakpointName {
+ PyObject *lldb::SBBreakpointName::__str__ (){
+ lldb::SBStream description;
+ $self->GetDescription (description);
+ const char *desc = description.GetData();
+ size_t desc_len = description.GetSize();
+ if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
+ --desc_len;
+ if (desc_len > 0)
+ return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
+ else
+ return lldb_private::PythonString("").release();
+ }
+}
+
%extend lldb::SBBroadcaster {
%pythoncode %{
def __eq__(self, rhs):