LLDB mainline
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
lldb_private::BreakpointLocationCollection Class Reference

#include <BreakpointLocationCollection.h>

Public Types

typedef AdaptedIterable< collection, lldb::BreakpointLocationSP, vector_adapterBreakpointLocationCollectionIterable
 

Public Member Functions

 BreakpointLocationCollection ()
 
 ~BreakpointLocationCollection ()
 
BreakpointLocationCollectionoperator= (const BreakpointLocationCollection &rhs)
 
void Add (const lldb::BreakpointLocationSP &bp_loc_sp)
 Add the breakpoint bp_loc_sp to the list.
 
bool Remove (lldb::break_id_t break_id, lldb::break_id_t break_loc_id)
 Removes the breakpoint location given by breakID from this list.
 
lldb::BreakpointLocationSP FindByIDPair (lldb::break_id_t break_id, lldb::break_id_t break_loc_id)
 Returns a shared pointer to the breakpoint location with id breakID.
 
const lldb::BreakpointLocationSP FindByIDPair (lldb::break_id_t break_id, lldb::break_id_t break_loc_id) const
 Returns a shared pointer to the breakpoint location with id breakID, const version.
 
lldb::BreakpointLocationSP GetByIndex (size_t i)
 Returns a shared pointer to the breakpoint location with index i.
 
const lldb::BreakpointLocationSP GetByIndex (size_t i) const
 Returns a shared pointer to the breakpoint location with index i, const version.
 
size_t GetSize () const
 Returns the number of elements in this breakpoint location list.
 
bool ShouldStop (StoppointCallbackContext *context)
 Enquires of all the breakpoint locations in this list whether we should stop at a hit at breakID.
 
void GetDescription (Stream *s, lldb::DescriptionLevel level)
 Print a description of the breakpoint locations in this list to the stream s.
 
bool ValidForThisThread (Thread &thread)
 Check whether this collection of breakpoint locations have any thread specifiers, and if yes, is thread_id contained in any of these specifiers.
 
bool IsInternal () const
 Tell whether ALL the breakpoints in the location collection are internal.
 
BreakpointLocationCollectionIterable BreakpointLocations ()
 

Private Types

typedef std::vector< lldb::BreakpointLocationSPcollection
 

Private Member Functions

collection::iterator GetIDPairIterator (lldb::break_id_t break_id, lldb::break_id_t break_loc_id)
 
collection::const_iterator GetIDPairConstIterator (lldb::break_id_t break_id, lldb::break_id_t break_loc_id) const
 

Private Attributes

collection m_break_loc_collection
 
std::mutex m_collection_mutex
 

Detailed Description

Definition at line 20 of file BreakpointLocationCollection.h.

Member Typedef Documentation

◆ BreakpointLocationCollectionIterable

Definition at line 170 of file BreakpointLocationCollection.h.

◆ collection

Definition at line 155 of file BreakpointLocationCollection.h.

Constructor & Destructor Documentation

◆ BreakpointLocationCollection()

BreakpointLocationCollection::BreakpointLocationCollection ( )
default

◆ ~BreakpointLocationCollection()

BreakpointLocationCollection::~BreakpointLocationCollection ( )
default

Member Function Documentation

◆ Add()

void BreakpointLocationCollection::Add ( const lldb::BreakpointLocationSP bp_loc_sp)

◆ BreakpointLocations()

BreakpointLocationCollectionIterable lldb_private::BreakpointLocationCollection::BreakpointLocations ( )
inline

◆ FindByIDPair() [1/2]

BreakpointLocationSP BreakpointLocationCollection::FindByIDPair ( lldb::break_id_t  break_id,
lldb::break_id_t  break_loc_id 
)

Returns a shared pointer to the breakpoint location with id breakID.

Parameters
[in]break_idThe breakpoint ID to seek for.
[in]break_loc_idThe breakpoint location ID in break_id to seek for.
Returns
A shared pointer to the breakpoint. May contain a NULL pointer if the breakpoint doesn't exist.

Definition at line 79 of file BreakpointLocationCollection.cpp.

References GetIDPairIterator(), and m_break_loc_collection.

Referenced by Add(), and lldb_private::Breakpoint::ModuleReplaced().

◆ FindByIDPair() [2/2]

const BreakpointLocationSP BreakpointLocationCollection::FindByIDPair ( lldb::break_id_t  break_id,
lldb::break_id_t  break_loc_id 
) const

Returns a shared pointer to the breakpoint location with id breakID, const version.

Parameters
[in]break_idThe breakpoint location ID to seek for.
[in]break_loc_idThe breakpoint location ID in break_id to seek for.
Returns
A shared pointer to the breakpoint. May contain a NULL pointer if the breakpoint doesn't exist.

Definition at line 89 of file BreakpointLocationCollection.cpp.

References GetIDPairConstIterator(), and m_break_loc_collection.

◆ GetByIndex() [1/2]

BreakpointLocationSP BreakpointLocationCollection::GetByIndex ( size_t  i)

Returns a shared pointer to the breakpoint location with index i.

Parameters
[in]iThe breakpoint location index to seek for.
Returns
A shared pointer to the breakpoint. May contain a NULL pointer if the breakpoint doesn't exist.

Definition at line 100 of file BreakpointLocationCollection.cpp.

References m_break_loc_collection, and m_collection_mutex.

Referenced by lldb_private::Breakpoint::BreakpointEventData::GetBreakpointLocationAtIndexFromEvent(), lldb_private::BreakpointSite::GetConstituentAtIndex(), lldb_private::BreakpointSite::IsBreakpointAtThisSite(), lldb_private::Breakpoint::ModuleReplaced(), lldb_private::Breakpoint::ModulesChanged(), lldb_private::StopInfoBreakpoint::PerformAction(), ShouldStop(), and lldb_private::BreakpointSite::~BreakpointSite().

◆ GetByIndex() [2/2]

const BreakpointLocationSP BreakpointLocationCollection::GetByIndex ( size_t  i) const

Returns a shared pointer to the breakpoint location with index i, const version.

Parameters
[in]iThe breakpoint location index to seek for.
Returns
A shared pointer to the breakpoint. May contain a NULL pointer if the breakpoint doesn't exist.

Definition at line 110 of file BreakpointLocationCollection.cpp.

References m_break_loc_collection, and m_collection_mutex.

◆ GetDescription()

void BreakpointLocationCollection::GetDescription ( Stream s,
lldb::DescriptionLevel  level 
)

Print a description of the breakpoint locations in this list to the stream s.

Parameters
[in]sThe stream to which to print the description.
[in]levelThe description level that indicates the detail level to provide.
See also
lldb::DescriptionLevel

Definition at line 167 of file BreakpointLocationCollection.cpp.

References m_break_loc_collection, m_collection_mutex, and lldb_private::Stream::PutChar().

Referenced by lldb_private::BreakpointSite::GetDescription().

◆ GetIDPairConstIterator()

BreakpointLocationCollection::collection::const_iterator BreakpointLocationCollection::GetIDPairConstIterator ( lldb::break_id_t  break_id,
lldb::break_id_t  break_loc_id 
) const
private

Definition at line 70 of file BreakpointLocationCollection.cpp.

References m_break_loc_collection.

Referenced by FindByIDPair().

◆ GetIDPairIterator()

BreakpointLocationCollection::collection::iterator BreakpointLocationCollection::GetIDPairIterator ( lldb::break_id_t  break_id,
lldb::break_id_t  break_loc_id 
)
private

Definition at line 61 of file BreakpointLocationCollection.cpp.

References m_break_loc_collection.

Referenced by FindByIDPair(), and Remove().

◆ GetSize()

size_t lldb_private::BreakpointLocationCollection::GetSize ( ) const
inline

◆ IsInternal()

bool BreakpointLocationCollection::IsInternal ( ) const

Tell whether ALL the breakpoints in the location collection are internal.

Returns
true if all breakpoint locations are owned by internal breakpoints, false otherwise.

Definition at line 151 of file BreakpointLocationCollection.cpp.

References m_break_loc_collection, and m_collection_mutex.

Referenced by lldb_private::BreakpointSite::IsInternal().

◆ operator=()

BreakpointLocationCollection & BreakpointLocationCollection::operator= ( const BreakpointLocationCollection rhs)

Definition at line 180 of file BreakpointLocationCollection.cpp.

References m_break_loc_collection, and m_collection_mutex.

◆ Remove()

bool BreakpointLocationCollection::Remove ( lldb::break_id_t  break_id,
lldb::break_id_t  break_loc_id 
)

Removes the breakpoint location given by breakID from this list.

Parameters
[in]break_idThe breakpoint index to remove.
[in]break_loc_idThe breakpoint location index in break_id to remove.
Returns
true if the breakpoint was in the list.

Definition at line 33 of file BreakpointLocationCollection.cpp.

References GetIDPairIterator(), m_break_loc_collection, and m_collection_mutex.

Referenced by lldb_private::BreakpointSite::RemoveConstituent().

◆ ShouldStop()

bool BreakpointLocationCollection::ShouldStop ( StoppointCallbackContext context)

Enquires of all the breakpoint locations in this list whether we should stop at a hit at breakID.

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

Definition at line 119 of file BreakpointLocationCollection.cpp.

References GetByIndex(), and GetSize().

Referenced by lldb_private::BreakpointSite::ShouldStop().

◆ ValidForThisThread()

bool BreakpointLocationCollection::ValidForThisThread ( Thread thread)

Check whether this collection of breakpoint locations have any thread specifiers, and if yes, is thread_id contained in any of these specifiers.

Parameters
[in]threadThe thread against which to test.

return true if the collection contains at least one location that would be valid for this thread, false otherwise.

Definition at line 139 of file BreakpointLocationCollection.cpp.

References m_break_loc_collection, and m_collection_mutex.

Referenced by lldb_private::BreakpointSite::ValidForThisThread().

Member Data Documentation

◆ m_break_loc_collection

collection lldb_private::BreakpointLocationCollection::m_break_loc_collection
private

◆ m_collection_mutex

std::mutex lldb_private::BreakpointLocationCollection::m_collection_mutex
mutableprivate

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