Greg Clayton | 1fa6b3d | 2011-10-13 18:08:26 +0000 | [diff] [blame] | 1 | //===-- SWIG Interface for SBWatchpoint -----------------*- C++ -*-===// |
Johnny Chen | 092bd15 | 2011-09-27 01:19:20 +0000 | [diff] [blame] | 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | namespace lldb { |
| 11 | |
| 12 | %feature("docstring", |
Johnny Chen | ecd4feb | 2011-10-14 00:42:25 +0000 | [diff] [blame] | 13 | "Represents an instance of watchpoint for a specific target program. |
Johnny Chen | 092bd15 | 2011-09-27 01:19:20 +0000 | [diff] [blame] | 14 | |
Johnny Chen | ecd4feb | 2011-10-14 00:42:25 +0000 | [diff] [blame] | 15 | A watchpoint is determined by the address and the byte size that resulted in |
| 16 | this particular instantiation. Each watchpoint has its settable options. |
Johnny Chen | 092bd15 | 2011-09-27 01:19:20 +0000 | [diff] [blame] | 17 | |
Johnny Chen | 2395ede | 2011-10-26 00:44:40 +0000 | [diff] [blame] | 18 | See also SBTarget.watchpoint_iter() for example usage of iterating through the |
| 19 | watchpoints of the target." |
Greg Clayton | 1fa6b3d | 2011-10-13 18:08:26 +0000 | [diff] [blame] | 20 | ) SBWatchpoint; |
| 21 | class SBWatchpoint |
Johnny Chen | 092bd15 | 2011-09-27 01:19:20 +0000 | [diff] [blame] | 22 | { |
| 23 | public: |
| 24 | |
Greg Clayton | 1fa6b3d | 2011-10-13 18:08:26 +0000 | [diff] [blame] | 25 | SBWatchpoint (); |
Johnny Chen | 092bd15 | 2011-09-27 01:19:20 +0000 | [diff] [blame] | 26 | |
Greg Clayton | 1fa6b3d | 2011-10-13 18:08:26 +0000 | [diff] [blame] | 27 | SBWatchpoint (const lldb::SBWatchpoint &rhs); |
Johnny Chen | 092bd15 | 2011-09-27 01:19:20 +0000 | [diff] [blame] | 28 | |
Greg Clayton | 1fa6b3d | 2011-10-13 18:08:26 +0000 | [diff] [blame] | 29 | ~SBWatchpoint (); |
Johnny Chen | 092bd15 | 2011-09-27 01:19:20 +0000 | [diff] [blame] | 30 | |
Johnny Chen | 092bd15 | 2011-09-27 01:19:20 +0000 | [diff] [blame] | 31 | bool |
Greg Clayton | 1fa6b3d | 2011-10-13 18:08:26 +0000 | [diff] [blame] | 32 | IsValid(); |
Johnny Chen | 092bd15 | 2011-09-27 01:19:20 +0000 | [diff] [blame] | 33 | |
Johnny Chen | 41a55ef | 2011-10-14 19:15:48 +0000 | [diff] [blame] | 34 | SBError |
| 35 | GetError(); |
| 36 | |
| 37 | watch_id_t |
| 38 | GetID (); |
| 39 | |
Johnny Chen | 092bd15 | 2011-09-27 01:19:20 +0000 | [diff] [blame] | 40 | %feature("docstring", " |
| 41 | //------------------------------------------------------------------ |
| 42 | /// With -1 representing an invalid hardware index. |
| 43 | //------------------------------------------------------------------ |
| 44 | ") GetHardwareIndex; |
| 45 | int32_t |
Greg Clayton | 1fa6b3d | 2011-10-13 18:08:26 +0000 | [diff] [blame] | 46 | GetHardwareIndex (); |
Johnny Chen | 092bd15 | 2011-09-27 01:19:20 +0000 | [diff] [blame] | 47 | |
| 48 | lldb::addr_t |
Greg Clayton | 1fa6b3d | 2011-10-13 18:08:26 +0000 | [diff] [blame] | 49 | GetWatchAddress (); |
Johnny Chen | 092bd15 | 2011-09-27 01:19:20 +0000 | [diff] [blame] | 50 | |
| 51 | size_t |
Greg Clayton | 1fa6b3d | 2011-10-13 18:08:26 +0000 | [diff] [blame] | 52 | GetWatchSize(); |
Johnny Chen | 092bd15 | 2011-09-27 01:19:20 +0000 | [diff] [blame] | 53 | |
| 54 | void |
| 55 | SetEnabled(bool enabled); |
| 56 | |
| 57 | bool |
| 58 | IsEnabled (); |
| 59 | |
| 60 | uint32_t |
Greg Clayton | 1fa6b3d | 2011-10-13 18:08:26 +0000 | [diff] [blame] | 61 | GetHitCount (); |
Johnny Chen | 092bd15 | 2011-09-27 01:19:20 +0000 | [diff] [blame] | 62 | |
| 63 | uint32_t |
| 64 | GetIgnoreCount (); |
| 65 | |
| 66 | void |
| 67 | SetIgnoreCount (uint32_t n); |
| 68 | |
Johnny Chen | a5dd2bb | 2011-10-18 19:13:06 +0000 | [diff] [blame] | 69 | %feature("docstring", " |
| 70 | //------------------------------------------------------------------ |
| 71 | /// Get the condition expression for the watchpoint. |
| 72 | //------------------------------------------------------------------ |
| 73 | ") GetCondition; |
Johnny Chen | 712a628 | 2011-10-17 18:58:00 +0000 | [diff] [blame] | 74 | const char * |
| 75 | GetCondition (); |
| 76 | |
Johnny Chen | a5dd2bb | 2011-10-18 19:13:06 +0000 | [diff] [blame] | 77 | %feature("docstring", " |
| 78 | //-------------------------------------------------------------------------- |
| 79 | /// The watchpoint stops only if the condition expression evaluates to true. |
| 80 | //-------------------------------------------------------------------------- |
| 81 | ") SetCondition; |
Johnny Chen | 712a628 | 2011-10-17 18:58:00 +0000 | [diff] [blame] | 82 | void |
| 83 | SetCondition (const char *condition); |
| 84 | |
Johnny Chen | 092bd15 | 2011-09-27 01:19:20 +0000 | [diff] [blame] | 85 | bool |
| 86 | GetDescription (lldb::SBStream &description, DescriptionLevel level); |
| 87 | }; |
| 88 | |
| 89 | } // namespace lldb |