diff options
Diffstat (limited to 'lldb/source/API')
-rw-r--r-- | lldb/source/API/SBWatchpoint.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lldb/source/API/SBWatchpoint.cpp b/lldb/source/API/SBWatchpoint.cpp index 4794ba4c501..eb50fa8118e 100644 --- a/lldb/source/API/SBWatchpoint.cpp +++ b/lldb/source/API/SBWatchpoint.cpp @@ -11,6 +11,7 @@ #include "lldb/API/SBDefines.h" #include "lldb/API/SBAddress.h" #include "lldb/API/SBDebugger.h" +#include "lldb/API/SBEvent.h" #include "lldb/API/SBStream.h" #include "lldb/lldb-types.h" @@ -271,3 +272,27 @@ SBWatchpoint::SetSP (const lldb::WatchpointSP &sp) { m_opaque_sp = sp; } + +bool +SBWatchpoint::EventIsWatchpointEvent (const lldb::SBEvent &event) +{ + return Watchpoint::WatchpointEventData::GetEventDataFromEvent(event.get()) != NULL; + +} + +WatchpointEventType +SBWatchpoint::GetWatchpointEventTypeFromEvent (const SBEvent& event) +{ + if (event.IsValid()) + return Watchpoint::WatchpointEventData::GetWatchpointEventTypeFromEvent (event.GetSP()); + return eWatchpointEventTypeInvalidType; +} + +SBWatchpoint +SBWatchpoint::GetWatchpointFromEvent (const lldb::SBEvent& event) +{ + SBWatchpoint sb_watchpoint; + if (event.IsValid()) + sb_watchpoint.m_opaque_sp = Watchpoint::WatchpointEventData::GetWatchpointFromEvent (event.GetSP()); + return sb_watchpoint; +} |