summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/Python
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2011-09-24 00:50:33 +0000
committerJohnny Chen <johnny.chen@apple.com>2011-09-24 00:50:33 +0000
commit6027c94d2f7f31917226e0eaa544d22cdf90a713 (patch)
treefca2d082140d8cdc921ff665ceb30869d2ed7334 /lldb/scripts/Python
parent52da28be500e95fd0c7c2e85fb54a727df184550 (diff)
downloadbcm5719-llvm-6027c94d2f7f31917226e0eaa544d22cdf90a713.tar.gz
bcm5719-llvm-6027c94d2f7f31917226e0eaa544d22cdf90a713.zip
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. llvm-svn: 140436
Diffstat (limited to 'lldb/scripts/Python')
-rw-r--r--lldb/scripts/Python/interface/SBFrame.i9
1 files changed, 9 insertions, 0 deletions
diff --git a/lldb/scripts/Python/interface/SBFrame.i b/lldb/scripts/Python/interface/SBFrame.i
index 28526ab7478..19bccc7a032 100644
--- a/lldb/scripts/Python/interface/SBFrame.i
+++ b/lldb/scripts/Python/interface/SBFrame.i
@@ -215,6 +215,15 @@ public:
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);
OpenPOWER on IntegriCloud