diff options
author | Johnny Chen <johnny.chen@apple.com> | 2011-09-27 01:19:20 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2011-09-27 01:19:20 +0000 |
commit | d4dd7993b55811b9d3f1fa2d13c8c26dcfcfa2b2 (patch) | |
tree | 2b0bf3c04511cc03f63583e462c6ea988a659509 /lldb/scripts/Python/python-extensions.swig | |
parent | f272d40d7cc507e48f42dbd79d182878e0effeaa (diff) | |
download | bcm5719-llvm-d4dd7993b55811b9d3f1fa2d13c8c26dcfcfa2b2.tar.gz bcm5719-llvm-d4dd7993b55811b9d3f1fa2d13c8c26dcfcfa2b2.zip |
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
Diffstat (limited to 'lldb/scripts/Python/python-extensions.swig')
-rw-r--r-- | lldb/scripts/Python/python-extensions.swig | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lldb/scripts/Python/python-extensions.swig b/lldb/scripts/Python/python-extensions.swig index 246fd97982e..5c302ba6f86 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()); + } +} |