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