From 1b282f9619f68a60d4b8f4dd0c68b0a07e1a1293 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Thu, 13 Oct 2011 18:08:26 +0000 Subject: Cleaned up the SBWatchpoint public API. llvm-svn: 141876 --- lldb/scripts/Python/interface/SBTarget.i | 40 ++++++------ lldb/scripts/Python/interface/SBValue.i | 6 ++ lldb/scripts/Python/interface/SBWatchpoint.i | 71 ++++++++++++++++++++++ .../Python/interface/SBWatchpointLocation.i | 71 ---------------------- 4 files changed, 99 insertions(+), 89 deletions(-) create mode 100644 lldb/scripts/Python/interface/SBWatchpoint.i delete mode 100644 lldb/scripts/Python/interface/SBWatchpointLocation.i (limited to 'lldb/scripts/Python/interface') diff --git a/lldb/scripts/Python/interface/SBTarget.i b/lldb/scripts/Python/interface/SBTarget.i index f93128d2e19..9c628a621ff 100644 --- a/lldb/scripts/Python/interface/SBTarget.i +++ b/lldb/scripts/Python/interface/SBTarget.i @@ -442,28 +442,32 @@ public: 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/lldb/scripts/Python/interface/SBValue.i b/lldb/scripts/Python/interface/SBValue.i index 8792464b245..439e0abb7f7 100644 --- a/lldb/scripts/Python/interface/SBValue.i +++ b/lldb/scripts/Python/interface/SBValue.i @@ -278,6 +278,12 @@ public: 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/lldb/scripts/Python/interface/SBWatchpoint.i b/lldb/scripts/Python/interface/SBWatchpoint.i new file mode 100644 index 00000000000..5ddba459aaa --- /dev/null +++ b/lldb/scripts/Python/interface/SBWatchpoint.i @@ -0,0 +1,71 @@ +//===-- SWIG Interface for SBWatchpoint -----------------*- 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." +) SBWatchpoint; +class SBWatchpoint +{ +public: + + SBWatchpoint (); + + SBWatchpoint (const lldb::SBWatchpoint &rhs); + + ~SBWatchpoint (); + + watch_id_t + GetID (); + + bool + IsValid(); + + %feature("docstring", " + //------------------------------------------------------------------ + /// With -1 representing an invalid hardware index. + //------------------------------------------------------------------ + ") GetHardwareIndex; + int32_t + GetHardwareIndex (); + + lldb::addr_t + GetWatchAddress (); + + size_t + GetWatchSize(); + + void + SetEnabled(bool enabled); + + bool + IsEnabled (); + + uint32_t + GetHitCount (); + + uint32_t + GetIgnoreCount (); + + void + SetIgnoreCount (uint32_t n); + + bool + GetDescription (lldb::SBStream &description, DescriptionLevel level); +}; + +} // namespace lldb diff --git a/lldb/scripts/Python/interface/SBWatchpointLocation.i b/lldb/scripts/Python/interface/SBWatchpointLocation.i deleted file mode 100644 index a5e21ddb894..00000000000 --- a/lldb/scripts/Python/interface/SBWatchpointLocation.i +++ /dev/null @@ -1,71 +0,0 @@ -//===-- 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 -- cgit v1.2.3