summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/Python/interface
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/scripts/Python/interface')
-rw-r--r--lldb/scripts/Python/interface/SBTarget.i37
-rw-r--r--lldb/scripts/Python/interface/SBWatchpointLocation.i71
2 files changed, 106 insertions, 2 deletions
diff --git a/lldb/scripts/Python/interface/SBTarget.i b/lldb/scripts/Python/interface/SBTarget.i
index acd894cb57a..3bf14b1010a 100644
--- a/lldb/scripts/Python/interface/SBTarget.i
+++ b/lldb/scripts/Python/interface/SBTarget.i
@@ -12,7 +12,8 @@ namespace lldb {
%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 @@ and,
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 @@ public:
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;
diff --git a/lldb/scripts/Python/interface/SBWatchpointLocation.i b/lldb/scripts/Python/interface/SBWatchpointLocation.i
new file mode 100644
index 00000000000..a5e21ddb894
--- /dev/null
+++ b/lldb/scripts/Python/interface/SBWatchpointLocation.i
@@ -0,0 +1,71 @@
+//===-- SWIG Interface for SBWatchpointLocation -----------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+%feature("docstring",
+"Represents an instance of watchpoint location for a specific target program.
+
+A watchpoint location is determined by the address and the byte size that
+resulted in this particular instantiation. Each watchpoint location has its
+settable options.
+
+See also SBTarget.watchpoint_location_iter() for for example usage of iterating
+through the watchpoint locations of the target."
+) SBWatchpointLocation;
+class SBWatchpointLocation
+{
+public:
+
+ SBWatchpointLocation ();
+
+ SBWatchpointLocation (const lldb::SBWatchpointLocation &rhs);
+
+ ~SBWatchpointLocation ();
+
+ watch_id_t
+ GetID () const;
+
+ bool
+ IsValid() const;
+
+ %feature("docstring", "
+ //------------------------------------------------------------------
+ /// With -1 representing an invalid hardware index.
+ //------------------------------------------------------------------
+ ") GetHardwareIndex;
+ int32_t
+ GetHardwareIndex () const;
+
+ lldb::addr_t
+ GetWatchAddress () const;
+
+ size_t
+ GetWatchSize() const;
+
+ void
+ SetEnabled(bool enabled);
+
+ bool
+ IsEnabled ();
+
+ uint32_t
+ GetHitCount () const;
+
+ uint32_t
+ GetIgnoreCount ();
+
+ void
+ SetIgnoreCount (uint32_t n);
+
+ bool
+ GetDescription (lldb::SBStream &description, DescriptionLevel level);
+};
+
+} // namespace lldb
OpenPOWER on IntegriCloud