Add an SB API SBFrame::WatchValue() and exported to the Python interface to
set a watchpoint Pythonically. If the find-and-watch-a-variable operation
fails, an invalid SBValue is returned, instead.
Example Python usage:
value = frame0.WatchValue('global',
lldb.eValueTypeVariableGlobal,
lldb.LLDB_WATCH_TYPE_READ|lldb.LLDB_WATCH_TYPE_WRITE)
Add TestSetWatchpoint.py to exercise this API.
We have 400 test cases now.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140436 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/scripts/Python/interface/SBFrame.i b/scripts/Python/interface/SBFrame.i
index 28526ab..19bccc7 100644
--- a/scripts/Python/interface/SBFrame.i
+++ b/scripts/Python/interface/SBFrame.i
@@ -215,6 +215,15 @@
lldb::SBValue
FindValue (const char *name, ValueType value_type, lldb::DynamicValueType use_dynamic);
+ %feature("docstring", "
+ /// Find and watch a variable using the frame as the scope.
+ /// It returns an SBValue, similar to FindValue() method, if find-and-watch
+ /// operation succeeds. Otherwise, an invalid SBValue is returned.
+ /// You can use LLDB_WATCH_TYPE_READ | LLDB_WATCH_TYPE_WRITE for 'rw' watch.
+ ") FindValue;
+ lldb::SBValue
+ WatchValue (const char *name, ValueType value_type, uint32_t watch_type);
+
bool
GetDescription (lldb::SBStream &description);