Cleaned up the SBWatchpoint public API.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141876 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/scripts/Python/interface/SBTarget.i b/scripts/Python/interface/SBTarget.i
index f93128d..9c628a6 100644
--- a/scripts/Python/interface/SBTarget.i
+++ b/scripts/Python/interface/SBTarget.i
@@ -442,28 +442,32 @@
     DeleteAllBreakpoints ();
 
     uint32_t
-    GetNumWatchpointLocations () const;
-
-    lldb::SBWatchpointLocation
-    GetLastCreatedWatchpointLocation ();
-
-    lldb::SBWatchpointLocation
-    GetWatchpointLocationAtIndex (uint32_t idx) const;
-
+    GetNumWatchpoints () const;
+    
+    lldb::SBWatchpoint
+    GetWatchpointAtIndex (uint32_t idx) const;
+    
     bool
-    WatchpointLocationDelete (watch_id_t watch_id);
-
-    lldb::SBWatchpointLocation
-    FindWatchpointLocationByID (watch_id_t watch_id);
-
+    DeleteWatchpoint (lldb::watch_id_t watch_id);
+    
+    lldb::SBWatchpoint
+    FindWatchpointByID (lldb::watch_id_t watch_id);
+    
     bool
-    EnableAllWatchpointLocations ();
-
+    EnableAllWatchpoints ();
+    
     bool
-    DisableAllWatchpointLocations ();
-
+    DisableAllWatchpoints ();
+    
     bool
-    DeleteAllWatchpointLocations ();
+    DeleteAllWatchpoints ();
+
+    lldb::SBWatchpoint
+    WatchAddress (lldb::addr_t addr, 
+                  size_t size, 
+                  bool read, 
+                  bool write);
+             
 
     lldb::SBBroadcaster
     GetBroadcaster () const;
diff --git a/scripts/Python/interface/SBValue.i b/scripts/Python/interface/SBValue.i
index 8792464..439e0ab 100644
--- a/scripts/Python/interface/SBValue.i
+++ b/scripts/Python/interface/SBValue.i
@@ -278,6 +278,12 @@
     lldb::SBFrame
     GetFrame();
     
+    lldb::SBWatchpoint
+    Watch (bool resolve_location, bool read, bool write);
+
+    lldb::SBWatchpoint
+    WatchPointee (bool resolve_location, bool read, bool write);
+
     bool
     GetDescription (lldb::SBStream &description);
 
diff --git a/scripts/Python/interface/SBWatchpointLocation.i b/scripts/Python/interface/SBWatchpoint.i
similarity index 75%
rename from scripts/Python/interface/SBWatchpointLocation.i
rename to scripts/Python/interface/SBWatchpoint.i
index a5e21dd..5ddba45 100644
--- a/scripts/Python/interface/SBWatchpointLocation.i
+++ b/scripts/Python/interface/SBWatchpoint.i
@@ -1,4 +1,4 @@
-//===-- SWIG Interface for SBWatchpointLocation -----------------*- C++ -*-===//
+//===-- SWIG Interface for SBWatchpoint -----------------*- C++ -*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -18,22 +18,22 @@
 
 See also SBTarget.watchpoint_location_iter() for for example usage of iterating
 through the watchpoint locations of the target."
-) SBWatchpointLocation;
-class SBWatchpointLocation
+) SBWatchpoint;
+class SBWatchpoint
 {
 public:
 
-    SBWatchpointLocation ();
+    SBWatchpoint ();
 
-    SBWatchpointLocation (const lldb::SBWatchpointLocation &rhs);
+    SBWatchpoint (const lldb::SBWatchpoint &rhs);
 
-    ~SBWatchpointLocation ();
+    ~SBWatchpoint ();
 
     watch_id_t
-    GetID () const;
+    GetID ();
 
     bool
-    IsValid() const;
+    IsValid();
 
     %feature("docstring", "
     //------------------------------------------------------------------
@@ -41,13 +41,13 @@
     //------------------------------------------------------------------
     ") GetHardwareIndex;
     int32_t
-    GetHardwareIndex () const;
+    GetHardwareIndex ();
 
     lldb::addr_t
-    GetWatchAddress () const;
+    GetWatchAddress ();
 
     size_t
-    GetWatchSize() const;
+    GetWatchSize();
 
     void
     SetEnabled(bool enabled);
@@ -56,7 +56,7 @@
     IsEnabled ();
 
     uint32_t
-    GetHitCount () const;
+    GetHitCount ();
 
     uint32_t
     GetIgnoreCount ();