Export the watchpoint related API (SBWatchpointLocation class and added SBTarget methods)
to the Python interface.
Implement yet another (threre're 3 now) iterator protocol for SBTarget: watchpoint_location_iter(),
to iterate on the available watchpoint locations. And add a print representation for
SBWatchpointLocation.
Exercise some of these Python API with TestWatchpointLocationIter.py.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140595 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/scripts/Python/python-extensions.swig b/scripts/Python/python-extensions.swig
index 246fd97..5c302ba 100644
--- a/scripts/Python/python-extensions.swig
+++ b/scripts/Python/python-extensions.swig
@@ -160,4 +160,11 @@
return PyString_FromString (description.GetData());
}
}
+%extend lldb::SBWatchpointLocation {
+ PyObject *lldb::SBWatchpointLocation::__repr__ (){
+ lldb::SBStream description;
+ $self->GetDescription (description, lldb::eDescriptionLevelVerbose);
+ return PyString_FromString (description.GetData());
+ }
+}