Add initial implementation of watchpoint commands for list, enable, disable, and delete.
Test cases to be added later.
llvm-svn: 140322
diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp
index 7fc9257..9f9f4a7 100644
--- a/lldb/source/Target/Target.cpp
+++ b/lldb/source/Target/Target.cpp
@@ -586,7 +586,6 @@
if (rc.Fail())
return false;
}
- m_watchpoint_location_list.SetEnabledAll (false);
return true; // Success!
}
@@ -612,7 +611,6 @@
if (rc.Fail())
return false;
}
- m_watchpoint_location_list.SetEnabledAll (true);
return true; // Success!
}
@@ -631,11 +629,10 @@
if (wp_loc_sp)
{
Error rc = m_process_sp->DisableWatchpoint(wp_loc_sp.get());
- if (rc.Fail())
- return false;
+ if (rc.Success())
+ return true;
- wp_loc_sp->SetEnabled (false);
- return true;
+ // Else, fallthrough.
}
return false;
}
@@ -655,11 +652,10 @@
if (wp_loc_sp)
{
Error rc = m_process_sp->EnableWatchpoint(wp_loc_sp.get());
- if (rc.Fail())
- return false;
+ if (rc.Success())
+ return true;
- wp_loc_sp->SetEnabled (true);
- return true;
+ // Else, fallthrough.
}
return false;
}