Greg Clayton | 1b282f9 | 2011-10-13 18:08:26 +0000 | [diff] [blame] | 1 | //===-- SBWatchpoint.cpp --------------------------------*- C++ -*-===// |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +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 | |
Greg Clayton | 1b282f9 | 2011-10-13 18:08:26 +0000 | [diff] [blame] | 10 | #include "lldb/API/SBWatchpoint.h" |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 11 | #include "lldb/API/SBDefines.h" |
| 12 | #include "lldb/API/SBAddress.h" |
| 13 | #include "lldb/API/SBDebugger.h" |
Jim Ingham | 1b5792e | 2012-12-18 02:03:49 +0000 | [diff] [blame] | 14 | #include "lldb/API/SBEvent.h" |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 15 | #include "lldb/API/SBStream.h" |
| 16 | |
| 17 | #include "lldb/lldb-types.h" |
| 18 | #include "lldb/lldb-defines.h" |
Johnny Chen | 01a6786 | 2011-10-14 00:42:25 +0000 | [diff] [blame] | 19 | #include "lldb/Breakpoint/Watchpoint.h" |
| 20 | #include "lldb/Breakpoint/WatchpointList.h" |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 21 | #include "lldb/Core/Log.h" |
| 22 | #include "lldb/Core/Stream.h" |
| 23 | #include "lldb/Core/StreamFile.h" |
| 24 | #include "lldb/Target/Target.h" |
| 25 | |
| 26 | using namespace lldb; |
| 27 | using namespace lldb_private; |
| 28 | |
| 29 | |
Greg Clayton | 1b282f9 | 2011-10-13 18:08:26 +0000 | [diff] [blame] | 30 | SBWatchpoint::SBWatchpoint () : |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 31 | m_opaque_sp () |
| 32 | { |
| 33 | } |
| 34 | |
Johnny Chen | 01a6786 | 2011-10-14 00:42:25 +0000 | [diff] [blame] | 35 | SBWatchpoint::SBWatchpoint (const lldb::WatchpointSP &wp_sp) : |
| 36 | m_opaque_sp (wp_sp) |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 37 | { |
Greg Clayton | 5160ce5 | 2013-03-27 23:08:40 +0000 | [diff] [blame] | 38 | Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 39 | |
| 40 | if (log) |
| 41 | { |
| 42 | SBStream sstr; |
| 43 | GetDescription (sstr, lldb::eDescriptionLevelBrief); |
Johnny Chen | 01a6786 | 2011-10-14 00:42:25 +0000 | [diff] [blame] | 44 | log->Printf ("SBWatchpoint::SBWatchpoint (const lldb::WatchpointSP &wp_sp" |
Saleem Abdulrasool | 324a103 | 2014-04-04 04:06:10 +0000 | [diff] [blame] | 45 | "=%p) => this.sp = %p (%s)", |
| 46 | static_cast<void*>(wp_sp.get()), |
| 47 | static_cast<void*>(m_opaque_sp.get()), sstr.GetData()); |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 48 | } |
| 49 | } |
| 50 | |
Greg Clayton | 1b282f9 | 2011-10-13 18:08:26 +0000 | [diff] [blame] | 51 | SBWatchpoint::SBWatchpoint(const SBWatchpoint &rhs) : |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 52 | m_opaque_sp (rhs.m_opaque_sp) |
| 53 | { |
| 54 | } |
| 55 | |
Greg Clayton | 1b282f9 | 2011-10-13 18:08:26 +0000 | [diff] [blame] | 56 | const SBWatchpoint & |
| 57 | SBWatchpoint::operator = (const SBWatchpoint &rhs) |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 58 | { |
| 59 | if (this != &rhs) |
| 60 | m_opaque_sp = rhs.m_opaque_sp; |
| 61 | return *this; |
| 62 | } |
| 63 | |
| 64 | |
Greg Clayton | 1b282f9 | 2011-10-13 18:08:26 +0000 | [diff] [blame] | 65 | SBWatchpoint::~SBWatchpoint () |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 66 | { |
| 67 | } |
| 68 | |
Johnny Chen | d4dd799 | 2011-09-27 01:19:20 +0000 | [diff] [blame] | 69 | watch_id_t |
Greg Clayton | 1b282f9 | 2011-10-13 18:08:26 +0000 | [diff] [blame] | 70 | SBWatchpoint::GetID () |
Johnny Chen | d4dd799 | 2011-09-27 01:19:20 +0000 | [diff] [blame] | 71 | { |
Greg Clayton | 5160ce5 | 2013-03-27 23:08:40 +0000 | [diff] [blame] | 72 | Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); |
Johnny Chen | d4dd799 | 2011-09-27 01:19:20 +0000 | [diff] [blame] | 73 | |
| 74 | watch_id_t watch_id = LLDB_INVALID_WATCH_ID; |
Greg Clayton | 81e871e | 2012-02-04 02:27:34 +0000 | [diff] [blame] | 75 | lldb::WatchpointSP watchpoint_sp(GetSP()); |
| 76 | if (watchpoint_sp) |
| 77 | watch_id = watchpoint_sp->GetID(); |
Johnny Chen | d4dd799 | 2011-09-27 01:19:20 +0000 | [diff] [blame] | 78 | |
| 79 | if (log) |
| 80 | { |
| 81 | if (watch_id == LLDB_INVALID_WATCH_ID) |
Saleem Abdulrasool | 324a103 | 2014-04-04 04:06:10 +0000 | [diff] [blame] | 82 | log->Printf ("SBWatchpoint(%p)::GetID () => LLDB_INVALID_WATCH_ID", |
| 83 | static_cast<void*>(watchpoint_sp.get())); |
Johnny Chen | d4dd799 | 2011-09-27 01:19:20 +0000 | [diff] [blame] | 84 | else |
Saleem Abdulrasool | 324a103 | 2014-04-04 04:06:10 +0000 | [diff] [blame] | 85 | log->Printf ("SBWatchpoint(%p)::GetID () => %u", |
| 86 | static_cast<void*>(watchpoint_sp.get()), watch_id); |
Johnny Chen | d4dd799 | 2011-09-27 01:19:20 +0000 | [diff] [blame] | 87 | } |
| 88 | |
| 89 | return watch_id; |
| 90 | } |
| 91 | |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 92 | bool |
Greg Clayton | 1b282f9 | 2011-10-13 18:08:26 +0000 | [diff] [blame] | 93 | SBWatchpoint::IsValid() const |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 94 | { |
Jim Ingham | f94e179 | 2012-08-11 00:35:26 +0000 | [diff] [blame] | 95 | return (bool) m_opaque_sp; |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 96 | } |
| 97 | |
Jim Ingham | ef42a6f | 2012-06-06 18:46:25 +0000 | [diff] [blame] | 98 | SBError |
| 99 | SBWatchpoint::GetError () |
| 100 | { |
| 101 | SBError sb_error; |
| 102 | lldb::WatchpointSP watchpoint_sp(GetSP()); |
| 103 | if (watchpoint_sp) |
| 104 | { |
| 105 | sb_error.SetError(watchpoint_sp->GetError()); |
| 106 | } |
| 107 | return sb_error; |
| 108 | } |
| 109 | |
Johnny Chen | d4dd799 | 2011-09-27 01:19:20 +0000 | [diff] [blame] | 110 | int32_t |
Greg Clayton | 1b282f9 | 2011-10-13 18:08:26 +0000 | [diff] [blame] | 111 | SBWatchpoint::GetHardwareIndex () |
Johnny Chen | d4dd799 | 2011-09-27 01:19:20 +0000 | [diff] [blame] | 112 | { |
| 113 | int32_t hw_index = -1; |
| 114 | |
Greg Clayton | 81e871e | 2012-02-04 02:27:34 +0000 | [diff] [blame] | 115 | lldb::WatchpointSP watchpoint_sp(GetSP()); |
| 116 | if (watchpoint_sp) |
Johnny Chen | d4dd799 | 2011-09-27 01:19:20 +0000 | [diff] [blame] | 117 | { |
Greg Clayton | 81e871e | 2012-02-04 02:27:34 +0000 | [diff] [blame] | 118 | Mutex::Locker api_locker (watchpoint_sp->GetTarget().GetAPIMutex()); |
| 119 | hw_index = watchpoint_sp->GetHardwareIndex(); |
Johnny Chen | d4dd799 | 2011-09-27 01:19:20 +0000 | [diff] [blame] | 120 | } |
| 121 | |
| 122 | return hw_index; |
| 123 | } |
| 124 | |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 125 | addr_t |
Greg Clayton | 1b282f9 | 2011-10-13 18:08:26 +0000 | [diff] [blame] | 126 | SBWatchpoint::GetWatchAddress () |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 127 | { |
| 128 | addr_t ret_addr = LLDB_INVALID_ADDRESS; |
| 129 | |
Greg Clayton | 81e871e | 2012-02-04 02:27:34 +0000 | [diff] [blame] | 130 | lldb::WatchpointSP watchpoint_sp(GetSP()); |
| 131 | if (watchpoint_sp) |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 132 | { |
Greg Clayton | 81e871e | 2012-02-04 02:27:34 +0000 | [diff] [blame] | 133 | Mutex::Locker api_locker (watchpoint_sp->GetTarget().GetAPIMutex()); |
| 134 | ret_addr = watchpoint_sp->GetLoadAddress(); |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 135 | } |
| 136 | |
| 137 | return ret_addr; |
| 138 | } |
| 139 | |
| 140 | size_t |
Greg Clayton | 1b282f9 | 2011-10-13 18:08:26 +0000 | [diff] [blame] | 141 | SBWatchpoint::GetWatchSize () |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 142 | { |
| 143 | size_t watch_size = 0; |
| 144 | |
Greg Clayton | 81e871e | 2012-02-04 02:27:34 +0000 | [diff] [blame] | 145 | lldb::WatchpointSP watchpoint_sp(GetSP()); |
| 146 | if (watchpoint_sp) |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 147 | { |
Greg Clayton | 81e871e | 2012-02-04 02:27:34 +0000 | [diff] [blame] | 148 | Mutex::Locker api_locker (watchpoint_sp->GetTarget().GetAPIMutex()); |
| 149 | watch_size = watchpoint_sp->GetByteSize(); |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 150 | } |
| 151 | |
| 152 | return watch_size; |
| 153 | } |
| 154 | |
| 155 | void |
Greg Clayton | 1b282f9 | 2011-10-13 18:08:26 +0000 | [diff] [blame] | 156 | SBWatchpoint::SetEnabled (bool enabled) |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 157 | { |
Greg Clayton | 81e871e | 2012-02-04 02:27:34 +0000 | [diff] [blame] | 158 | lldb::WatchpointSP watchpoint_sp(GetSP()); |
| 159 | if (watchpoint_sp) |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 160 | { |
Greg Clayton | 81e871e | 2012-02-04 02:27:34 +0000 | [diff] [blame] | 161 | Mutex::Locker api_locker (watchpoint_sp->GetTarget().GetAPIMutex()); |
| 162 | watchpoint_sp->GetTarget().DisableWatchpointByID(watchpoint_sp->GetID()); |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 163 | } |
| 164 | } |
| 165 | |
| 166 | bool |
Greg Clayton | 1b282f9 | 2011-10-13 18:08:26 +0000 | [diff] [blame] | 167 | SBWatchpoint::IsEnabled () |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 168 | { |
Greg Clayton | 81e871e | 2012-02-04 02:27:34 +0000 | [diff] [blame] | 169 | lldb::WatchpointSP watchpoint_sp(GetSP()); |
| 170 | if (watchpoint_sp) |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 171 | { |
Greg Clayton | 81e871e | 2012-02-04 02:27:34 +0000 | [diff] [blame] | 172 | Mutex::Locker api_locker (watchpoint_sp->GetTarget().GetAPIMutex()); |
| 173 | return watchpoint_sp->IsEnabled(); |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 174 | } |
| 175 | else |
| 176 | return false; |
| 177 | } |
| 178 | |
| 179 | uint32_t |
Greg Clayton | 1b282f9 | 2011-10-13 18:08:26 +0000 | [diff] [blame] | 180 | SBWatchpoint::GetHitCount () |
Johnny Chen | d4dd799 | 2011-09-27 01:19:20 +0000 | [diff] [blame] | 181 | { |
| 182 | uint32_t count = 0; |
Greg Clayton | 81e871e | 2012-02-04 02:27:34 +0000 | [diff] [blame] | 183 | lldb::WatchpointSP watchpoint_sp(GetSP()); |
| 184 | if (watchpoint_sp) |
Johnny Chen | d4dd799 | 2011-09-27 01:19:20 +0000 | [diff] [blame] | 185 | { |
Greg Clayton | 81e871e | 2012-02-04 02:27:34 +0000 | [diff] [blame] | 186 | Mutex::Locker api_locker (watchpoint_sp->GetTarget().GetAPIMutex()); |
| 187 | count = watchpoint_sp->GetHitCount(); |
Johnny Chen | d4dd799 | 2011-09-27 01:19:20 +0000 | [diff] [blame] | 188 | } |
| 189 | |
Greg Clayton | 5160ce5 | 2013-03-27 23:08:40 +0000 | [diff] [blame] | 190 | Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); |
Johnny Chen | d4dd799 | 2011-09-27 01:19:20 +0000 | [diff] [blame] | 191 | if (log) |
Saleem Abdulrasool | 324a103 | 2014-04-04 04:06:10 +0000 | [diff] [blame] | 192 | log->Printf ("SBWatchpoint(%p)::GetHitCount () => %u", |
| 193 | static_cast<void*>(watchpoint_sp.get()), count); |
Johnny Chen | d4dd799 | 2011-09-27 01:19:20 +0000 | [diff] [blame] | 194 | |
| 195 | return count; |
| 196 | } |
| 197 | |
| 198 | uint32_t |
Greg Clayton | 1b282f9 | 2011-10-13 18:08:26 +0000 | [diff] [blame] | 199 | SBWatchpoint::GetIgnoreCount () |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 200 | { |
Greg Clayton | 81e871e | 2012-02-04 02:27:34 +0000 | [diff] [blame] | 201 | lldb::WatchpointSP watchpoint_sp(GetSP()); |
| 202 | if (watchpoint_sp) |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 203 | { |
Greg Clayton | 81e871e | 2012-02-04 02:27:34 +0000 | [diff] [blame] | 204 | Mutex::Locker api_locker (watchpoint_sp->GetTarget().GetAPIMutex()); |
| 205 | return watchpoint_sp->GetIgnoreCount(); |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 206 | } |
| 207 | else |
| 208 | return 0; |
| 209 | } |
| 210 | |
| 211 | void |
Greg Clayton | 1b282f9 | 2011-10-13 18:08:26 +0000 | [diff] [blame] | 212 | SBWatchpoint::SetIgnoreCount (uint32_t n) |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 213 | { |
Greg Clayton | 81e871e | 2012-02-04 02:27:34 +0000 | [diff] [blame] | 214 | lldb::WatchpointSP watchpoint_sp(GetSP()); |
| 215 | if (watchpoint_sp) |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 216 | { |
Greg Clayton | 81e871e | 2012-02-04 02:27:34 +0000 | [diff] [blame] | 217 | Mutex::Locker api_locker (watchpoint_sp->GetTarget().GetAPIMutex()); |
| 218 | watchpoint_sp->SetIgnoreCount (n); |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 219 | } |
| 220 | } |
| 221 | |
Johnny Chen | 16dcf71 | 2011-10-17 18:58:00 +0000 | [diff] [blame] | 222 | const char * |
| 223 | SBWatchpoint::GetCondition () |
| 224 | { |
Greg Clayton | 81e871e | 2012-02-04 02:27:34 +0000 | [diff] [blame] | 225 | lldb::WatchpointSP watchpoint_sp(GetSP()); |
| 226 | if (watchpoint_sp) |
Johnny Chen | 16dcf71 | 2011-10-17 18:58:00 +0000 | [diff] [blame] | 227 | { |
Greg Clayton | 81e871e | 2012-02-04 02:27:34 +0000 | [diff] [blame] | 228 | Mutex::Locker api_locker (watchpoint_sp->GetTarget().GetAPIMutex()); |
| 229 | return watchpoint_sp->GetConditionText (); |
Johnny Chen | 16dcf71 | 2011-10-17 18:58:00 +0000 | [diff] [blame] | 230 | } |
| 231 | return NULL; |
| 232 | } |
| 233 | |
| 234 | void |
| 235 | SBWatchpoint::SetCondition (const char *condition) |
| 236 | { |
Greg Clayton | 81e871e | 2012-02-04 02:27:34 +0000 | [diff] [blame] | 237 | lldb::WatchpointSP watchpoint_sp(GetSP()); |
| 238 | if (watchpoint_sp) |
Johnny Chen | 16dcf71 | 2011-10-17 18:58:00 +0000 | [diff] [blame] | 239 | { |
Greg Clayton | 81e871e | 2012-02-04 02:27:34 +0000 | [diff] [blame] | 240 | Mutex::Locker api_locker (watchpoint_sp->GetTarget().GetAPIMutex()); |
| 241 | watchpoint_sp->SetCondition (condition); |
Johnny Chen | 16dcf71 | 2011-10-17 18:58:00 +0000 | [diff] [blame] | 242 | } |
| 243 | } |
| 244 | |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 245 | bool |
Greg Clayton | 1b282f9 | 2011-10-13 18:08:26 +0000 | [diff] [blame] | 246 | SBWatchpoint::GetDescription (SBStream &description, DescriptionLevel level) |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 247 | { |
Greg Clayton | da7bc7d | 2011-11-13 06:57:31 +0000 | [diff] [blame] | 248 | Stream &strm = description.ref(); |
| 249 | |
Greg Clayton | 81e871e | 2012-02-04 02:27:34 +0000 | [diff] [blame] | 250 | lldb::WatchpointSP watchpoint_sp(GetSP()); |
| 251 | if (watchpoint_sp) |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 252 | { |
Greg Clayton | 81e871e | 2012-02-04 02:27:34 +0000 | [diff] [blame] | 253 | Mutex::Locker api_locker (watchpoint_sp->GetTarget().GetAPIMutex()); |
| 254 | watchpoint_sp->GetDescription (&strm, level); |
Greg Clayton | da7bc7d | 2011-11-13 06:57:31 +0000 | [diff] [blame] | 255 | strm.EOL(); |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 256 | } |
| 257 | else |
Greg Clayton | da7bc7d | 2011-11-13 06:57:31 +0000 | [diff] [blame] | 258 | strm.PutCString ("No value"); |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 259 | |
| 260 | return true; |
| 261 | } |
| 262 | |
Greg Clayton | 81e871e | 2012-02-04 02:27:34 +0000 | [diff] [blame] | 263 | void |
| 264 | SBWatchpoint::Clear () |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 265 | { |
Greg Clayton | 81e871e | 2012-02-04 02:27:34 +0000 | [diff] [blame] | 266 | m_opaque_sp.reset(); |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 267 | } |
| 268 | |
Greg Clayton | 81e871e | 2012-02-04 02:27:34 +0000 | [diff] [blame] | 269 | lldb::WatchpointSP |
| 270 | SBWatchpoint::GetSP () const |
Johnny Chen | 5d04346 | 2011-09-26 22:40:50 +0000 | [diff] [blame] | 271 | { |
| 272 | return m_opaque_sp; |
| 273 | } |
Greg Clayton | 81e871e | 2012-02-04 02:27:34 +0000 | [diff] [blame] | 274 | |
| 275 | void |
| 276 | SBWatchpoint::SetSP (const lldb::WatchpointSP &sp) |
| 277 | { |
| 278 | m_opaque_sp = sp; |
| 279 | } |
Jim Ingham | 1b5792e | 2012-12-18 02:03:49 +0000 | [diff] [blame] | 280 | |
| 281 | bool |
| 282 | SBWatchpoint::EventIsWatchpointEvent (const lldb::SBEvent &event) |
| 283 | { |
| 284 | return Watchpoint::WatchpointEventData::GetEventDataFromEvent(event.get()) != NULL; |
| 285 | |
| 286 | } |
| 287 | |
| 288 | WatchpointEventType |
| 289 | SBWatchpoint::GetWatchpointEventTypeFromEvent (const SBEvent& event) |
| 290 | { |
| 291 | if (event.IsValid()) |
| 292 | return Watchpoint::WatchpointEventData::GetWatchpointEventTypeFromEvent (event.GetSP()); |
| 293 | return eWatchpointEventTypeInvalidType; |
| 294 | } |
| 295 | |
| 296 | SBWatchpoint |
| 297 | SBWatchpoint::GetWatchpointFromEvent (const lldb::SBEvent& event) |
| 298 | { |
| 299 | SBWatchpoint sb_watchpoint; |
| 300 | if (event.IsValid()) |
| 301 | sb_watchpoint.m_opaque_sp = Watchpoint::WatchpointEventData::GetWatchpointFromEvent (event.GetSP()); |
| 302 | return sb_watchpoint; |
| 303 | } |