summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBWatchpoint.cpp
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2012-06-04 23:19:54 +0000
committerJohnny Chen <johnny.chen@apple.com>2012-06-04 23:19:54 +0000
commitb90827e66c6576a229b9018ba8400a2e3e300d02 (patch)
tree982b29230add06d804c9c61b0299fd05fd992d3e /lldb/source/API/SBWatchpoint.cpp
parent188d830405a47a6c1b5c87f85cd46bce587c2ec7 (diff)
downloadbcm5719-llvm-b90827e66c6576a229b9018ba8400a2e3e300d02.tar.gz
bcm5719-llvm-b90827e66c6576a229b9018ba8400a2e3e300d02.zip
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. llvm-svn: 157964
Diffstat (limited to 'lldb/source/API/SBWatchpoint.cpp')
-rw-r--r--lldb/source/API/SBWatchpoint.cpp17
1 files changed, 1 insertions, 16 deletions
diff --git a/lldb/source/API/SBWatchpoint.cpp b/lldb/source/API/SBWatchpoint.cpp
index fd505aead54..76ce57cccf7 100644
--- a/lldb/source/API/SBWatchpoint.cpp
+++ b/lldb/source/API/SBWatchpoint.cpp
@@ -87,22 +87,7 @@ SBWatchpoint::GetID ()
bool
SBWatchpoint::IsValid() const
{
- lldb::WatchpointSP watchpoint_sp(GetSP());
- if (watchpoint_sp && watchpoint_sp->GetError().Success())
- return true;
- return false;
-}
-
-SBError
-SBWatchpoint::GetError ()
-{
- SBError sb_error;
- lldb::WatchpointSP watchpoint_sp(GetSP());
- if (watchpoint_sp)
- {
- sb_error.SetError(watchpoint_sp->GetError());
- }
- return sb_error;
+ return m_opaque_sp;
}
int32_t
OpenPOWER on IntegriCloud