From d4dd7993b55811b9d3f1fa2d13c8c26dcfcfa2b2 Mon Sep 17 00:00:00 2001 From: Johnny Chen Date: Tue, 27 Sep 2011 01:19:20 +0000 Subject: 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 --- lldb/scripts/Python/python-extensions.swig | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lldb/scripts/Python/python-extensions.swig') 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()); + } +} -- cgit v1.1