summaryrefslogtreecommitdiff
path: root/scripts/Python
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Python')
-rw-r--r--scripts/Python/python-extensions.swig15
-rw-r--r--scripts/Python/python-swigsafecast.swig7
2 files changed, 22 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):
diff --git a/scripts/Python/python-swigsafecast.swig b/scripts/Python/python-swigsafecast.swig
index ea3f21f859ad2..ffd7546323a00 100644
--- a/scripts/Python/python-swigsafecast.swig
+++ b/scripts/Python/python-swigsafecast.swig
@@ -115,6 +115,13 @@ SBTypeToSWIGWrapper (lldb::SBBreakpointLocation* breakpoint_location_sb)
template <>
PyObject*
+SBTypeToSWIGWrapper (lldb::SBBreakpointName* breakpoint_name_sb)
+{
+ return SWIG_NewPointerObj((void *) breakpoint_name_sb, SWIGTYPE_p_lldb__SBBreakpointName, 0);
+}
+
+template <>
+PyObject*
SBTypeToSWIGWrapper (lldb::SBValue* value_sb)
{
return SWIG_NewPointerObj((void *) value_sb, SWIGTYPE_p_lldb__SBValue, 0);