LLDB mainline
lldb_private::StopPointSiteList< StopPointSite > Class Template Reference

#include <StopPointSiteList.h>

Inheritance diagram for lldb_private::StopPointSiteList< StopPointSite >:
[legend]

Public Types

using StopPointSiteSP = std::shared_ptr<StopPointSite>
typedef void(* StopPointSiteSPMapFunc) (StopPointSite &site, void *baton)

Public Member Functions

StopPointSite::SiteID Add (const StopPointSiteSP &site_sp)
 Add a site to the list.
void Dump (Stream *s) const
 Standard Dump routine, doesn't do anything at present.
StopPointSiteSP FindByAddress (lldb::addr_t addr)
 Returns a shared pointer to the site at address addr.
StopPointSiteSP FindByID (typename StopPointSite::SiteID site_id)
 Returns a shared pointer to the site with id site_id.
const StopPointSiteSP FindByID (typename StopPointSite::SiteID site_id) const
 Returns a shared pointer to the site with id site_id - const version.
StopPointSite::SiteID FindIDByAddress (lldb::addr_t addr)
 Returns the site id to the site at address addr.
bool StopPointSiteContainsBreakpoint (typename StopPointSite::SiteID, lldb::break_id_t bp_id)
 Returns whether the BreakpointSite site_id has a BreakpointLocation that is part of Breakpoint bp_id.
void ForEach (std::function< void(StopPointSite *)> const &callback)
bool Remove (typename StopPointSite::SiteID site_id)
 Removes the site given by site_id from this list.
bool RemoveByAddress (lldb::addr_t addr)
 Removes the site at address addr from this list.
bool FindInRange (lldb::addr_t lower_bound, lldb::addr_t upper_bound, StopPointSiteList &bp_site_list) const
bool ShouldStop (StoppointCallbackContext *context, typename StopPointSite::SiteID site_id)
 Enquires of the site on in this list with ID site_id whether we should stop for the constituent or not.
size_t GetSize () const
 Returns the number of elements in the list.
bool IsEmpty () const
std::vector< StopPointSiteSPSites ()
void Clear ()

Protected Types

typedef std::map< lldb::addr_t, StopPointSiteSPcollection

Protected Member Functions

collection::iterator GetIDIterator (typename StopPointSite::SiteID site_id)
collection::const_iterator GetIDConstIterator (typename StopPointSite::SiteID site_id) const

Protected Attributes

std::recursive_mutex m_mutex
collection m_site_list

Friends

class Process

Detailed Description

template<typename StopPointSite>
class lldb_private::StopPointSiteList< StopPointSite >

Definition at line 22 of file StopPointSiteList.h.

Member Typedef Documentation

◆ collection

template<typename StopPointSite>
typedef std::map<lldb::addr_t, StopPointSiteSP> lldb_private::StopPointSiteList< StopPointSite >::collection
protected

Definition at line 272 of file StopPointSiteList.h.

◆ StopPointSiteSP

template<typename StopPointSite>
using lldb_private::StopPointSiteList< StopPointSite >::StopPointSiteSP = std::shared_ptr<StopPointSite>

Definition at line 29 of file StopPointSiteList.h.

◆ StopPointSiteSPMapFunc

template<typename StopPointSite>
typedef void(* lldb_private::StopPointSiteList< StopPointSite >::StopPointSiteSPMapFunc) (StopPointSite &site, void *baton)

Definition at line 214 of file StopPointSiteList.h.

Member Function Documentation

◆ Add()

template<typename StopPointSite>
StopPointSite::SiteID lldb_private::StopPointSiteList< StopPointSite >::Add ( const StopPointSiteSP & site_sp)
inline

Add a site to the list.

Parameters
[in]site_spA shared pointer to a site being added to the list.
Returns
The ID of the site in the list.

Definition at line 38 of file StopPointSiteList.h.

References m_mutex, m_site_list, and UINT32_MAX.

Referenced by FindInRange().

◆ Clear()

template<typename StopPointSite>
void lldb_private::StopPointSiteList< StopPointSite >::Clear ( )
inline

Definition at line 266 of file StopPointSiteList.h.

References m_mutex, and m_site_list.

◆ Dump()

template<typename StopPointSite>
void lldb_private::StopPointSiteList< StopPointSite >::Dump ( Stream * s) const
inline

Standard Dump routine, doesn't do anything at present.

Parameters
[in]sStream into which to dump the description.

Definition at line 50 of file StopPointSiteList.h.

References lldb_private::Stream::IndentLess(), lldb_private::Stream::IndentMore(), m_site_list, and lldb_private::Stream::Printf().

◆ FindByAddress()

template<typename StopPointSite>
StopPointSiteSP lldb_private::StopPointSiteList< StopPointSite >::FindByAddress ( lldb::addr_t addr)
inline

Returns a shared pointer to the site at address addr.

Parameters
[in]addrThe address to look for.
Returns
A shared pointer to the site. Nullptr if no site contains the address.

Definition at line 70 of file StopPointSiteList.h.

References m_mutex, and m_site_list.

Referenced by FindIDByAddress(), and lldb_private::ProcessWindows::RefreshStateAfterStop().

◆ FindByID() [1/2]

template<typename StopPointSite>
StopPointSiteSP lldb_private::StopPointSiteList< StopPointSite >::FindByID ( typename StopPointSite::SiteID site_id)
inline

Returns a shared pointer to the site with id site_id.

Parameters
[in]site_idThe site ID to seek for.
Returns
A shared pointer to the site. Nullptr if no matching site.

Definition at line 86 of file StopPointSiteList.h.

References GetIDIterator(), m_mutex, and m_site_list.

Referenced by CommandObjectProcessContinue::DoExecute(), and ShouldStop().

◆ FindByID() [2/2]

template<typename StopPointSite>
const StopPointSiteSP lldb_private::StopPointSiteList< StopPointSite >::FindByID ( typename StopPointSite::SiteID site_id) const
inline

Returns a shared pointer to the site with id site_id - const version.

Parameters
[in]site_idThe site ID to seek for.
Returns
A shared pointer to the site. Nullptr if no matching site.

Definition at line 104 of file StopPointSiteList.h.

References GetIDConstIterator(), m_mutex, and m_site_list.

◆ FindIDByAddress()

template<typename StopPointSite>
StopPointSite::SiteID lldb_private::StopPointSiteList< StopPointSite >::FindIDByAddress ( lldb::addr_t addr)
inline

Returns the site id to the site at address addr.

Parameters
[in]addrThe address to match.
Returns
The ID of the site, or LLDB_INVALID_SITE_ID.

Definition at line 121 of file StopPointSiteList.h.

References FindByAddress(), and UINT32_MAX.

◆ FindInRange()

template<typename StopPointSite>
bool lldb_private::StopPointSiteList< StopPointSite >::FindInRange ( lldb::addr_t lower_bound,
lldb::addr_t upper_bound,
StopPointSiteList< StopPointSite > & bp_site_list ) const
inline

Definition at line 185 of file StopPointSiteList.h.

References Add(), m_mutex, and m_site_list.

◆ ForEach()

◆ GetIDConstIterator()

template<typename StopPointSite>
collection::const_iterator lldb_private::StopPointSiteList< StopPointSite >::GetIDConstIterator ( typename StopPointSite::SiteID site_id) const
inlineprotected

Definition at line 286 of file StopPointSiteList.h.

References m_mutex, and m_site_list.

Referenced by FindByID().

◆ GetIDIterator()

template<typename StopPointSite>
collection::iterator lldb_private::StopPointSiteList< StopPointSite >::GetIDIterator ( typename StopPointSite::SiteID site_id)
inlineprotected

Definition at line 275 of file StopPointSiteList.h.

References m_mutex, and m_site_list.

Referenced by FindByID(), and Remove().

◆ GetSize()

template<typename StopPointSite>
size_t lldb_private::StopPointSiteList< StopPointSite >::GetSize ( ) const
inline

Returns the number of elements in the list.

Returns
The number of elements.

Definition at line 244 of file StopPointSiteList.h.

References m_mutex, and m_site_list.

◆ IsEmpty()

template<typename StopPointSite>
bool lldb_private::StopPointSiteList< StopPointSite >::IsEmpty ( ) const
inline

Definition at line 249 of file StopPointSiteList.h.

References m_mutex, and m_site_list.

Referenced by lldb_private::Process::WriteMemory().

◆ Remove()

template<typename StopPointSite>
bool lldb_private::StopPointSiteList< StopPointSite >::Remove ( typename StopPointSite::SiteID site_id)
inline

Removes the site given by site_id from this list.

Parameters
[in]site_idThe site ID to remove.
Returns
true if the site site_id was in the list.

Definition at line 158 of file StopPointSiteList.h.

References GetIDIterator(), m_mutex, and m_site_list.

◆ RemoveByAddress()

template<typename StopPointSite>
bool lldb_private::StopPointSiteList< StopPointSite >::RemoveByAddress ( lldb::addr_t addr)
inline

Removes the site at address addr from this list.

Parameters
[in]addrThe address from which to remove a site.
Returns
true if addr had a site to remove from the list.

Definition at line 175 of file StopPointSiteList.h.

References m_mutex, and m_site_list.

◆ ShouldStop()

template<typename StopPointSite>
bool lldb_private::StopPointSiteList< StopPointSite >::ShouldStop ( StoppointCallbackContext * context,
typename StopPointSite::SiteID site_id )
inline

Enquires of the site on in this list with ID site_id whether we should stop for the constituent or not.

Parameters
[in]contextThis contains the information about this stop.
[in]site_idThis site ID that we hit.
Returns
true if we should stop, false otherwise.

Definition at line 227 of file StopPointSiteList.h.

References FindByID().

◆ Sites()

template<typename StopPointSite>
std::vector< StopPointSiteSP > lldb_private::StopPointSiteList< StopPointSite >::Sites ( )
inline

Definition at line 254 of file StopPointSiteList.h.

References m_mutex, and m_site_list.

◆ StopPointSiteContainsBreakpoint()

template<typename StopPointSite>
bool lldb_private::StopPointSiteList< StopPointSite >::StopPointSiteContainsBreakpoint ( typename StopPointSite::SiteID ,
lldb::break_id_t bp_id )

Returns whether the BreakpointSite site_id has a BreakpointLocation that is part of Breakpoint bp_id.

NB this is only defined when StopPointSiteList is specialized for BreakpointSite's.

Parameters
[in]site_idThe site id to query.
[in]bp_idThe breakpoint id to look for in site_id's BreakpointLocations.
Returns
True if site_id exists in the site list AND bp_id is the breakpoint for one of the BreakpointLocations.

◆ Process

template<typename StopPointSite>
friend class Process
friend

Definition at line 26 of file StopPointSiteList.h.

References Process.

Referenced by Process.

Member Data Documentation

◆ m_mutex

template<typename StopPointSite>
std::recursive_mutex lldb_private::StopPointSiteList< StopPointSite >::m_mutex
mutableprotected

◆ m_site_list

template<typename StopPointSite>
collection lldb_private::StopPointSiteList< StopPointSite >::m_site_list
protected

The documentation for this class was generated from the following file: