|
LLDB mainline
|
#include <WatchpointResource.h>
Public Types | |
| typedef lldb::wp_resource_id_t | SiteID |
| typedef lldb::watch_id_t | ConstituentID |
| typedef std::vector< lldb::WatchpointSP > | WatchpointCollection |
| typedef LockingAdaptedIterable< std::mutex, WatchpointCollection > | WatchpointIterable |
Public Member Functions | |
| WatchpointResource (lldb::addr_t addr, size_t size, bool read, bool write) | |
| ~WatchpointResource () | |
| lldb::addr_t | GetLoadAddress () const |
| size_t | GetByteSize () const |
| bool | WatchpointResourceRead () const |
| bool | WatchpointResourceWrite () const |
| void | SetType (bool read, bool write) |
| WatchpointIterable | Constituents () |
| Iterate over the watchpoint constituents for this resource. | |
| bool | ShouldStop (StoppointCallbackContext *context) |
| Enquires of the atchpoints that produced this watchpoint resource whether we should stop at this location. | |
| void | Dump (Stream *s) const |
| Standard Dump method. | |
| void | AddConstituent (const lldb::WatchpointSP &constituent) |
| The "Constituents" are the watchpoints that share this resource. | |
| void | RemoveConstituent (lldb::WatchpointSP &constituent) |
| The method removes the constituent at constituent from this watchpoint resource. | |
| size_t | GetNumberOfConstituents () |
| This method returns the number of Watchpoints currently using watchpoint resource. | |
| lldb::WatchpointSP | GetConstituentAtIndex (size_t idx) |
| This method returns the Watchpoint at index index using this Resource. | |
| bool | ConstituentsContains (const lldb::WatchpointSP &wp_sp) |
| Check if the constituents includes a watchpoint. | |
| bool | ConstituentsContains (const lldb_private::Watchpoint *wp) |
| Check if the constituents includes a watchpoint. | |
| WatchpointCollection | CopyConstituentsList () |
| This method copies the watchpoint resource's constituents into a new collection. | |
| lldb::wp_resource_id_t | GetID () const |
| bool | Contains (lldb::addr_t addr) |
Protected Member Functions | |
| void | BumpHitCounts () |
Private Member Functions | |
| WatchpointResource (const WatchpointResource &)=delete | |
| const WatchpointResource & | operator= (const WatchpointResource &)=delete |
Static Private Member Functions | |
| static lldb::wp_resource_id_t | GetNextID () |
Private Attributes | |
| lldb::wp_resource_id_t | m_id |
| lldb::addr_t | m_addr |
| size_t | m_size |
| bool | m_watch_read |
| bool | m_watch_write |
| WatchpointCollection | m_constituents |
| The Watchpoints which own this resource. | |
| std::mutex | m_constituents_mutex |
| This mutex protects the constituents collection. | |
Friends | |
| class | StopInfoWatchpoint |
Definition at line 20 of file WatchpointResource.h.
Definition at line 29 of file WatchpointResource.h.
Definition at line 28 of file WatchpointResource.h.
| typedef std::vector<lldb::WatchpointSP> lldb_private::WatchpointResource::WatchpointCollection |
Definition at line 41 of file WatchpointResource.h.
| typedef LockingAdaptedIterable<std::mutex, WatchpointCollection> lldb_private::WatchpointResource::WatchpointIterable |
Definition at line 43 of file WatchpointResource.h.
| WatchpointResource::WatchpointResource | ( | lldb::addr_t | addr, |
| size_t | size, | ||
| bool | read, | ||
| bool | write ) |
Definition at line 19 of file WatchpointResource.cpp.
References GetNextID(), m_addr, m_id, m_size, m_watch_read, and m_watch_write.
Referenced by operator=(), and WatchpointResource().
| WatchpointResource::~WatchpointResource | ( | ) |
Definition at line 24 of file WatchpointResource.cpp.
References m_constituents, and m_constituents_mutex.
|
privatedelete |
References WatchpointResource().
| void WatchpointResource::AddConstituent | ( | const lldb::WatchpointSP & | constituent | ) |
The "Constituents" are the watchpoints that share this resource.
The method adds the constituent to this resource's constituent list.
| [in] | constituent | constituent is the Wachpoint to add. |
Definition at line 52 of file WatchpointResource.cpp.
References m_constituents, and m_constituents_mutex.
|
protected |
|
inline |
Iterate over the watchpoint constituents for this resource.
Definition at line 50 of file WatchpointResource.h.
References m_constituents, and m_constituents_mutex.
| bool WatchpointResource::ConstituentsContains | ( | const lldb::WatchpointSP & | wp_sp | ) |
Check if the constituents includes a watchpoint.
| [in] | wp_sp | The WatchpointSP to search for. |
Definition at line 69 of file WatchpointResource.cpp.
References ConstituentsContains().
Referenced by ConstituentsContains().
| bool WatchpointResource::ConstituentsContains | ( | const lldb_private::Watchpoint * | wp | ) |
Check if the constituents includes a watchpoint.
| [in] | wp | The Watchpoint to search for. |
Definition at line 73 of file WatchpointResource.cpp.
References m_constituents, and m_constituents_mutex.
| bool WatchpointResource::Contains | ( | lldb::addr_t | addr | ) |
Definition at line 46 of file WatchpointResource.cpp.
| WatchpointResource::WatchpointCollection WatchpointResource::CopyConstituentsList | ( | ) |
This method copies the watchpoint resource's constituents into a new collection.
It does this while the constituents mutex is locked.
Definition at line 89 of file WatchpointResource.cpp.
References m_constituents, and m_constituents_mutex.
| void WatchpointResource::Dump | ( | Stream * | s | ) | const |
Standard Dump method.
Definition at line 113 of file WatchpointResource.cpp.
References m_addr, m_size, and lldb_private::Stream::Printf().
| size_t WatchpointResource::GetByteSize | ( | ) | const |
Definition at line 31 of file WatchpointResource.cpp.
References m_size.
| WatchpointSP WatchpointResource::GetConstituentAtIndex | ( | size_t | idx | ) |
This method returns the Watchpoint at index index using this Resource.
The constituents are listed ordinally from 0 to GetNumberOfConstituents() - 1 so you can use this method to iterate over the constituents.
| [in] | idx | The index in the list of constituents for which you wish the constituent location. |
Definition at line 79 of file WatchpointResource.cpp.
References m_constituents, and m_constituents_mutex.
| wp_resource_id_t WatchpointResource::GetID | ( | ) | const |
Definition at line 44 of file WatchpointResource.cpp.
References m_id.
| addr_t WatchpointResource::GetLoadAddress | ( | ) | const |
Definition at line 29 of file WatchpointResource.cpp.
References m_addr.
|
staticprivate |
Definition at line 117 of file WatchpointResource.cpp.
Referenced by WatchpointResource().
| size_t WatchpointResource::GetNumberOfConstituents | ( | ) |
This method returns the number of Watchpoints currently using watchpoint resource.
Definition at line 64 of file WatchpointResource.cpp.
References m_constituents, and m_constituents_mutex.
|
privatedelete |
References WatchpointResource().
| void WatchpointResource::RemoveConstituent | ( | lldb::WatchpointSP & | constituent | ) |
The method removes the constituent at constituent from this watchpoint resource.
Definition at line 57 of file WatchpointResource.cpp.
References m_constituents, and m_constituents_mutex.
Definition at line 39 of file WatchpointResource.cpp.
References m_watch_read, and m_watch_write.
| bool WatchpointResource::ShouldStop | ( | StoppointCallbackContext * | context | ) |
Enquires of the atchpoints that produced this watchpoint resource whether we should stop at this location.
| [in] | context | This contains the information about this stop. |
Definition at line 94 of file WatchpointResource.cpp.
References m_constituents, and m_constituents_mutex.
| bool WatchpointResource::WatchpointResourceRead | ( | ) | const |
Definition at line 33 of file WatchpointResource.cpp.
References m_watch_read.
| bool WatchpointResource::WatchpointResourceWrite | ( | ) | const |
Definition at line 35 of file WatchpointResource.cpp.
References m_watch_write.
|
friend |
Definition at line 131 of file WatchpointResource.h.
References StopInfoWatchpoint.
Referenced by StopInfoWatchpoint.
|
private |
Definition at line 142 of file WatchpointResource.h.
Referenced by Contains(), Dump(), GetLoadAddress(), and WatchpointResource().
|
private |
The Watchpoints which own this resource.
Definition at line 149 of file WatchpointResource.h.
Referenced by AddConstituent(), Constituents(), ConstituentsContains(), CopyConstituentsList(), GetConstituentAtIndex(), GetNumberOfConstituents(), RemoveConstituent(), ShouldStop(), and ~WatchpointResource().
|
private |
This mutex protects the constituents collection.
Definition at line 152 of file WatchpointResource.h.
Referenced by AddConstituent(), Constituents(), ConstituentsContains(), CopyConstituentsList(), GetConstituentAtIndex(), GetNumberOfConstituents(), RemoveConstituent(), ShouldStop(), and ~WatchpointResource().
|
private |
Definition at line 138 of file WatchpointResource.h.
Referenced by GetID(), and WatchpointResource().
|
private |
Definition at line 143 of file WatchpointResource.h.
Referenced by Contains(), Dump(), GetByteSize(), and WatchpointResource().
|
private |
Definition at line 145 of file WatchpointResource.h.
Referenced by SetType(), WatchpointResource(), and WatchpointResourceRead().
|
private |
Definition at line 146 of file WatchpointResource.h.
Referenced by SetType(), WatchpointResource(), and WatchpointResourceWrite().