rdar://problem/11584012
Refactorings of watchpoint creation APIs so that SBTarget::WatchAddress(), SBValue::Watch(), and SBValue::WatchPointee()
now take an additional 'SBError &error' parameter (at the end) to contain the reason if there is some failure in the
operation. Update 'watchpoint set variable/expression' commands to take advantage of that.
Update existing test cases to reflect the API change and add test cases to verify that the SBError mechanism works for
SBTarget::WatchAddress() by passing an invalid watch_size.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157964 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/scripts/Python/interface/SBTarget.i b/scripts/Python/interface/SBTarget.i
index e8b6a00..052f4d6 100644
--- a/scripts/Python/interface/SBTarget.i
+++ b/scripts/Python/interface/SBTarget.i
@@ -668,7 +668,8 @@
WatchAddress (lldb::addr_t addr,
size_t size,
bool read,
- bool write);
+ bool write,
+ SBError &error);
lldb::SBBroadcaster
diff --git a/scripts/Python/interface/SBValue.i b/scripts/Python/interface/SBValue.i
index 9b9fd52..4b9d5d7 100644
--- a/scripts/Python/interface/SBValue.i
+++ b/scripts/Python/interface/SBValue.i
@@ -313,14 +313,14 @@
/// It returns an SBWatchpoint, which may be invalid.
") Watch;
lldb::SBWatchpoint
- Watch (bool resolve_location, bool read, bool write);
+ Watch (bool resolve_location, bool read, bool write, SBError &error);
%feature("docstring", "
/// Find and watch the location pointed to by a variable.
/// It returns an SBWatchpoint, which may be invalid.
") WatchPointee;
lldb::SBWatchpoint
- WatchPointee (bool resolve_location, bool read, bool write);
+ WatchPointee (bool resolve_location, bool read, bool write, SBError &error);
bool
GetDescription (lldb::SBStream &description);
diff --git a/scripts/Python/interface/SBWatchpoint.i b/scripts/Python/interface/SBWatchpoint.i
index 23c27d8..3649b2d 100644
--- a/scripts/Python/interface/SBWatchpoint.i
+++ b/scripts/Python/interface/SBWatchpoint.i
@@ -31,9 +31,6 @@
bool
IsValid();
- SBError
- GetError();
-
watch_id_t
GetID ();