|
LLDB mainline
|
This class is used by Watchpoint to manage a list of watchpoints,. More...
#include "lldb/Breakpoint/WatchpointList.h"
Public Types | |
| typedef std::list< lldb::WatchpointSP > | wp_collection |
| typedef LockingAdaptedIterable< std::recursive_mutex, wp_collection > | WatchpointIterable |
Public Member Functions | |
| WatchpointList () | |
| Default constructor makes an empty list. | |
| ~WatchpointList () | |
| Destructor, currently does nothing. | |
| lldb::watch_id_t | Add (const lldb::WatchpointSP &wp_sp, bool notify) |
| Add a Watchpoint to the list. | |
| void | Dump (Stream *s) const |
| Standard "Dump" method. | |
| void | DumpWithLevel (Stream *s, lldb::DescriptionLevel description_level) const |
| Dump with lldb::DescriptionLevel. | |
| const lldb::WatchpointSP | FindByAddress (lldb::addr_t addr) const |
| Returns a shared pointer to the watchpoint at address addr - const version. | |
| const lldb::WatchpointSP | FindBySpec (std::string spec) const |
| Returns a shared pointer to the watchpoint with watchpoint spec spec. | |
| lldb::WatchpointSP | FindByID (lldb::watch_id_t watchID) const |
| Returns a shared pointer to the watchpoint with id watchID, const version. | |
| lldb::watch_id_t | FindIDByAddress (lldb::addr_t addr) |
| Returns the watchpoint id to the watchpoint at address addr. | |
| lldb::watch_id_t | FindIDBySpec (std::string spec) |
| Returns the watchpoint id to the watchpoint with watchpoint spec spec. | |
| lldb::WatchpointSP | GetByIndex (uint32_t i) |
| Returns a shared pointer to the watchpoint with index i. | |
| const lldb::WatchpointSP | GetByIndex (uint32_t i) const |
| Returns a shared pointer to the watchpoint with index i, const version. | |
| bool | Remove (lldb::watch_id_t watchID, bool notify) |
| Removes the watchpoint given by watchID from this list. | |
| uint32_t | GetHitCount () const |
| Returns the number hit count of all watchpoints in this list. | |
| bool | ShouldStop (StoppointCallbackContext *context, lldb::watch_id_t watchID) |
| Enquires of the watchpoint in this list with ID watchID whether we should stop. | |
| size_t | GetSize () const |
| Returns the number of elements in this watchpoint list. | |
| void | GetDescription (Stream *s, lldb::DescriptionLevel level) |
| Print a description of the watchpoints in this list to the stream s. | |
| void | SetEnabledAll (bool enabled) |
| void | RemoveAll (bool notify) |
| void | GetListMutex (std::unique_lock< std::recursive_mutex > &lock) |
| Sets the passed in Locker to hold the Watchpoint List mutex. | |
| WatchpointIterable | Watchpoints () const |
Protected Types | |
| typedef std::vector< lldb::watch_id_t > | id_vector |
Protected Member Functions | |
| id_vector | GetWatchpointIDs () const |
| wp_collection::iterator | GetIDIterator (lldb::watch_id_t watchID) |
| wp_collection::const_iterator | GetIDConstIterator (lldb::watch_id_t watchID) const |
Protected Attributes | |
| wp_collection | m_watchpoints |
| std::recursive_mutex | m_mutex |
| lldb::watch_id_t | m_next_wp_id = 0 |
Friends | |
| class | Watchpoint |
| class | Target |
This class is used by Watchpoint to manage a list of watchpoints,.
Definition at line 27 of file WatchpointList.h.
|
protected |
Definition at line 197 of file WatchpointList.h.
| typedef LockingAdaptedIterable<std::recursive_mutex, wp_collection> lldb_private::WatchpointList::WatchpointIterable |
Definition at line 43 of file WatchpointList.h.
| typedef std::list<lldb::WatchpointSP> lldb_private::WatchpointList::wp_collection |
Definition at line 41 of file WatchpointList.h.
|
default |
Default constructor makes an empty list.
|
default |
Destructor, currently does nothing.
| lldb::watch_id_t WatchpointList::Add | ( | const lldb::WatchpointSP & | wp_sp, |
| bool | notify ) |
Add a Watchpoint to the list.
| [in] | wp_sp | A shared pointer to a watchpoint being added to the list. |
Definition at line 20 of file WatchpointList.cpp.
References lldb_private::Target::eBroadcastBitWatchpointChanged, m_mutex, m_next_wp_id, and m_watchpoints.
| void WatchpointList::Dump | ( | Stream * | s | ) | const |
Standard "Dump" method.
Definition at line 36 of file WatchpointList.cpp.
References DumpWithLevel(), and lldb::eDescriptionLevelBrief.
| void WatchpointList::DumpWithLevel | ( | Stream * | s, |
| lldb::DescriptionLevel | description_level ) const |
Dump with lldb::DescriptionLevel.
Definition at line 40 of file WatchpointList.cpp.
References lldb_private::Stream::IndentLess(), lldb_private::Stream::IndentMore(), m_mutex, m_watchpoints, and lldb_private::Stream::Printf().
Referenced by Dump().
| const WatchpointSP WatchpointList::FindByAddress | ( | lldb::addr_t | addr | ) | const |
Returns a shared pointer to the watchpoint at address addr - const version.
| [in] | addr | The address to look for. |
Definition at line 54 of file WatchpointList.cpp.
References m_mutex, and m_watchpoints.
Referenced by FindIDByAddress().
| WatchpointSP WatchpointList::FindByID | ( | lldb::watch_id_t | watchID | ) | const |
Returns a shared pointer to the watchpoint with id watchID, const version.
| [in] | watchID | The watchpoint location ID to seek for. |
Definition at line 111 of file WatchpointList.cpp.
References GetIDConstIterator(), m_mutex, and m_watchpoints.
Referenced by CommandObjectWatchpointCommandDelete::DoExecute(), CommandObjectWatchpointCommandList::DoExecute(), CommandObjectWatchpointList::DoExecute(), CommandObjectWatchpointModify::DoExecute(), ShouldStop(), and lldb_private::ScriptInterpreterLua::WatchpointCallbackFunction().
| const WatchpointSP WatchpointList::FindBySpec | ( | std::string | spec | ) | const |
Returns a shared pointer to the watchpoint with watchpoint spec spec.
| [in] | spec | The watchpoint spec to look for. |
Definition at line 72 of file WatchpointList.cpp.
References m_mutex, and m_watchpoints.
Referenced by FindIDBySpec().
| lldb::watch_id_t WatchpointList::FindIDByAddress | ( | lldb::addr_t | addr | ) |
Returns the watchpoint id to the watchpoint at address addr.
| [in] | addr | The address to match. |
Definition at line 121 of file WatchpointList.cpp.
References FindByAddress(), and LLDB_INVALID_WATCH_ID.
| lldb::watch_id_t WatchpointList::FindIDBySpec | ( | std::string | spec | ) |
Returns the watchpoint id to the watchpoint with watchpoint spec spec.
| [in] | spec | The watchpoint spec to match. |
Definition at line 129 of file WatchpointList.cpp.
References FindBySpec(), and LLDB_INVALID_WATCH_ID.
| WatchpointSP WatchpointList::GetByIndex | ( | uint32_t | i | ) |
Returns a shared pointer to the watchpoint with index i.
| [in] | i | The watchpoint index to seek for. |
Definition at line 137 of file WatchpointList.cpp.
References m_mutex, and m_watchpoints.
Referenced by CommandObjectWatchpointList::DoExecute().
| const WatchpointSP WatchpointList::GetByIndex | ( | uint32_t | i | ) | const |
Returns a shared pointer to the watchpoint with index i, const version.
| [in] | i | The watchpoint index to seek for. |
Definition at line 148 of file WatchpointList.cpp.
References m_mutex, and m_watchpoints.
| void WatchpointList::GetDescription | ( | Stream * | s, |
| lldb::DescriptionLevel | level ) |
Print a description of the watchpoints in this list to the stream s.
| [in] | s | The stream to which to print the description. |
| [in] | level | The description level that indicates the detail level to provide. |
Definition at line 211 of file WatchpointList.cpp.
References m_mutex, m_watchpoints, and lldb_private::Stream::Printf().
| uint32_t WatchpointList::GetHitCount | ( | ) | const |
Returns the number hit count of all watchpoints in this list.
Definition at line 187 of file WatchpointList.cpp.
References m_mutex, and m_watchpoints.
|
protected |
Definition at line 106 of file WatchpointList.cpp.
References m_watchpoints.
Referenced by FindByID().
|
protected |
Definition at line 100 of file WatchpointList.cpp.
References m_watchpoints.
Referenced by Remove().
| void WatchpointList::GetListMutex | ( | std::unique_lock< std::recursive_mutex > & | lock | ) |
Sets the passed in Locker to hold the Watchpoint List mutex.
| [in] | lock | The locker object that is set. |
Definition at line 249 of file WatchpointList.cpp.
References m_mutex.
Referenced by lldb_private::Target::CleanupProcess(), lldb_private::Target::CreateWatchpoint(), CommandObjectWatchpointDelete::DoExecute(), CommandObjectWatchpointDisable::DoExecute(), CommandObjectWatchpointEnable::DoExecute(), CommandObjectWatchpointIgnore::DoExecute(), CommandObjectWatchpointList::DoExecute(), and CommandObjectWatchpointModify::DoExecute().
|
inline |
Returns the number of elements in this watchpoint list.
Definition at line 165 of file WatchpointList.h.
References m_mutex, and m_watchpoints.
Referenced by CommandObjectWatchpointCommandDelete::DoExecute(), CommandObjectWatchpointCommandList::DoExecute(), CommandObjectWatchpointDelete::DoExecute(), CommandObjectWatchpointDisable::DoExecute(), CommandObjectWatchpointEnable::DoExecute(), CommandObjectWatchpointIgnore::DoExecute(), CommandObjectWatchpointList::DoExecute(), and CommandObjectWatchpointModify::DoExecute().
|
protected |
Definition at line 159 of file WatchpointList.cpp.
References m_watchpoints.
| bool WatchpointList::Remove | ( | lldb::watch_id_t | watchID, |
| bool | notify ) |
Removes the watchpoint given by watchID from this list.
| [in] | watchID | The watchpoint ID to remove. |
Definition at line 167 of file WatchpointList.cpp.
References lldb_private::Target::eBroadcastBitWatchpointChanged, GetIDIterator(), m_mutex, and m_watchpoints.
| void WatchpointList::RemoveAll | ( | bool | notify | ) |
Definition at line 229 of file WatchpointList.cpp.
References lldb_private::Target::eBroadcastBitWatchpointChanged, m_mutex, and m_watchpoints.
| void WatchpointList::SetEnabledAll | ( | bool | enabled | ) |
Definition at line 221 of file WatchpointList.cpp.
References m_mutex, and m_watchpoints.
| bool WatchpointList::ShouldStop | ( | StoppointCallbackContext * | context, |
| lldb::watch_id_t | watchID ) |
Enquires of the watchpoint in this list with ID watchID whether we should stop.
| [in] | context | This contains the information about this stop. |
| [in] | watchID | This watch ID that we hit. |
Definition at line 196 of file WatchpointList.cpp.
References FindByID().
|
inline |
Definition at line 192 of file WatchpointList.h.
References m_mutex, and m_watchpoints.
Referenced by lldb_private::CommandCompletions::WatchPointIDs().
|
friend |
|
friend |
|
mutableprotected |
Definition at line 207 of file WatchpointList.h.
Referenced by Add(), DumpWithLevel(), FindByAddress(), FindByID(), FindBySpec(), GetByIndex(), GetByIndex(), GetDescription(), GetHitCount(), GetListMutex(), GetSize(), Remove(), RemoveAll(), SetEnabledAll(), and Watchpoints().
|
protected |
Definition at line 209 of file WatchpointList.h.
Referenced by Add().
|
protected |
Definition at line 206 of file WatchpointList.h.
Referenced by Add(), DumpWithLevel(), FindByAddress(), FindByID(), FindBySpec(), GetByIndex(), GetByIndex(), GetDescription(), GetHitCount(), GetIDConstIterator(), GetIDIterator(), GetSize(), GetWatchpointIDs(), Remove(), RemoveAll(), SetEnabledAll(), and Watchpoints().