Export the watchpoint related API (SBWatchpointLocation class and added SBTarget methods)
to the Python interface.

Implement yet another (threre're 3 now) iterator protocol for SBTarget: watchpoint_location_iter(),
to iterate on the available watchpoint locations.  And add a print representation for
SBWatchpointLocation.

Exercise some of these Python API with TestWatchpointLocationIter.py.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140595 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/scripts/Python/interface/SBTarget.i b/scripts/Python/interface/SBTarget.i
index acd894c..3bf14b1 100644
--- a/scripts/Python/interface/SBTarget.i
+++ b/scripts/Python/interface/SBTarget.i
@@ -12,7 +12,8 @@
 %feature("docstring",
 "Represents the target program running under the debugger.
 
-SBTarget supports module and breakpoint iterations. For example,
+SBTarget supports module, breakpoint, and watchpoint_location iterations. For
+example,
 
     for m in target.module_iter():
         print m
@@ -34,7 +35,18 @@
 produces:
 
 SBBreakpoint: id = 1, file ='main.cpp', line = 66, locations = 1
-SBBreakpoint: id = 2, file ='main.cpp', line = 85, locations = 1"
+SBBreakpoint: id = 2, file ='main.cpp', line = 85, locations = 1
+
+and,
+
+    for wp_loc in target.watchpoint_location_iter():
+        print wp_loc
+
+produces:
+
+WatchpointLocation 1: addr = 0x1034ca048 size = 4 state = enabled type = rw
+    declare @ '/Volumes/data/lldb/svn/trunk/test/python_api/watchpoint/main.c:12'
+    hw_index = 0  hit_count = 2     ignore_count = 0     callback =      0x0 baton =      0x0"
 ) SBTarget;
 class SBTarget
 {
@@ -423,6 +435,27 @@
     bool
     DeleteAllBreakpoints ();
 
+    uint32_t
+    GetNumWatchpointLocations () const;
+
+    lldb::SBWatchpointLocation
+    GetWatchpointLocationAtIndex (uint32_t idx) const;
+
+    bool
+    WatchpointLocationDelete (watch_id_t watch_id);
+
+    lldb::SBWatchpointLocation
+    FindWatchpointLocationByID (watch_id_t watch_id);
+
+    bool
+    EnableAllWatchpointLocations ();
+
+    bool
+    DisableAllWatchpointLocations ();
+
+    bool
+    DeleteAllWatchpointLocations ();
+
     lldb::SBBroadcaster
     GetBroadcaster () const;