Add SBFrame.WatchLocation() to find and watch the location pointed to by
a variable usng the frame as the scope.
Add TestSetWatchpoint.py to exercise this API. Also fix some SWIG Python
docstrings.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140914 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/scripts/Python/interface/SBFrame.i b/scripts/Python/interface/SBFrame.i
index 19bccc7..40d6572 100644
--- a/scripts/Python/interface/SBFrame.i
+++ b/scripts/Python/interface/SBFrame.i
@@ -220,10 +220,20 @@
/// 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;
+ ") WatchValue;
lldb::SBValue
WatchValue (const char *name, ValueType value_type, uint32_t watch_type);
+ %feature("docstring", "
+ /// Find and watch the location pointed to by 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.
+ ") WatchLocation;
+ lldb::SBValue
+ WatchLocation (const char *name, ValueType value_type, uint32_t watch_type, size_t size);
+
bool
GetDescription (lldb::SBStream &description);
diff --git a/scripts/Python/interface/SBModule.i b/scripts/Python/interface/SBModule.i
index 84470ab..01bf470 100644
--- a/scripts/Python/interface/SBModule.i
+++ b/scripts/Python/interface/SBModule.i
@@ -48,7 +48,7 @@
print INDENT2 + repr(sym)
print INDENT2 + 'symbol type: %s' % symbol_type_to_str(sym.GetType())
-might produce this following output:
+produces this following output:
[0x0000000100001780-0x0000000100001d5c) a.out.__TEXT.__text
id = {0x00000004}, name = 'mask_access(MaskAction, unsigned int)', range = [0x00000001000017c0-0x0000000100001870)
diff --git a/scripts/Python/interface/SBType.i b/scripts/Python/interface/SBType.i
index ea20754..589287a 100644
--- a/scripts/Python/interface/SBType.i
+++ b/scripts/Python/interface/SBType.i
@@ -77,7 +77,7 @@
++total;
t = t->next;
}
- printf('We have a total number of %d tasks\n', total);
+ printf('We have a total number of %d tasks\\n', total);
// This corresponds to an empty task list.
Task *empty_task_head = new Task(-1, NULL);