LLDB mainline
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Friends | List of all members
lldb_private::StopPointSiteList< StopPointSite > Class Template Reference

#include <StopPointSiteList.h>

Inheritance diagram for lldb_private::StopPointSiteList< StopPointSite >:
Inheritance graph
[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

◆ Clear()

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

◆ 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(), lldb_private::StopPointSiteList< StopPointSite >::m_site_list, and lldb_private::Stream::Printf().

◆ FindByAddress()

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

◆ FindByID() [1/2]

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

◆ 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 lldb_private::StopPointSiteList< StopPointSite >::GetIDConstIterator(), lldb_private::StopPointSiteList< StopPointSite >::m_mutex, and lldb_private::StopPointSiteList< StopPointSite >::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 lldb_private::StopPointSiteList< StopPointSite >::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

◆ ForEach()

template<typename StopPointSite >
void lldb_private::StopPointSiteList< StopPointSite >::ForEach ( std::function< void(StopPointSite *)> const &  callback)
inline

◆ GetIDConstIterator()

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

◆ GetIDIterator()

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

◆ 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 lldb_private::StopPointSiteList< StopPointSite >::m_mutex, and lldb_private::StopPointSiteList< StopPointSite >::m_site_list.

◆ IsEmpty()

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

◆ 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 lldb_private::StopPointSiteList< StopPointSite >::GetIDIterator(), lldb_private::StopPointSiteList< StopPointSite >::m_mutex, and lldb_private::StopPointSiteList< StopPointSite >::m_site_list.

Referenced by lldb_private::Process::ClearBreakpointSiteByID(), and lldb_private::process_gdb_remote::ProcessGDBRemote::DisableWatchpoint().

◆ 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 lldb_private::StopPointSiteList< StopPointSite >::m_mutex, and lldb_private::StopPointSiteList< StopPointSite >::m_site_list.

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

◆ 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 lldb_private::StopPointSiteList< StopPointSite >::FindByID().

◆ Sites()

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

◆ 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.

Referenced by lldb_private::ItaniumABILanguageRuntime::ExceptionBreakpointsExplainStop(), and lldb_private::AppleObjCRuntime::ExceptionBreakpointsExplainStop().

Friends And Related Function Documentation

◆ Process

template<typename StopPointSite >
friend class Process
friend

Definition at line 26 of file StopPointSiteList.h.

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: