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.
llvm-svn: 140595
diff --git a/lldb/scripts/Python/python-extensions.swig b/lldb/scripts/Python/python-extensions.swig
index 246fd97..5c302ba 100644
--- a/lldb/scripts/Python/python-extensions.swig
+++ b/lldb/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());
+ }
+}