LLDB mainline
lldb_private::BreakpointLocationCollection Class Reference

#include <BreakpointLocationCollection.h>

Public Types

typedef llvm::iterator_range< collection::const_iterator > BreakpointLocationCollectionIterable

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

typedef llvm::iterator_range<collection::const_iterator> lldb_private::BreakpointLocationCollection::BreakpointLocationCollectionIterable

Definition at line 169 of file BreakpointLocationCollection.h.

◆ collection

Constructor & Destructor Documentation

◆ BreakpointLocationCollection()

BreakpointLocationCollection::BreakpointLocationCollection ( )
default

◆ ~BreakpointLocationCollection()

BreakpointLocationCollection::~BreakpointLocationCollection ( )
default

Member Function Documentation

◆ Add()

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

Add the breakpoint bp_loc_sp to the list.

Parameters
[in]bp_loc_spShared pointer to the breakpoint location that will get added to the list.

Definition at line 25 of file BreakpointLocationCollection.cpp.

References FindByIDPair(), m_break_loc_collection, and m_collection_mutex.

Referenced by lldb_private::BreakpointSite::CopyConstituentsList(), lldb_private::BreakpointLocationList::FindInModule(), lldb_private::Breakpoint::ModuleReplaced(), and lldb_private::Breakpoint::ModulesChanged().

◆ 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 77 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 87 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 98 of file BreakpointLocationCollection.cpp.

References m_break_loc_collection, and m_collection_mutex.

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

◆ 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 108 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 165 of file BreakpointLocationCollection.cpp.

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

◆ 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 69 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()

◆ 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 149 of file BreakpointLocationCollection.cpp.

References m_break_loc_collection, and m_collection_mutex.

◆ operator=()

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

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

◆ 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 117 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 137 of file BreakpointLocationCollection.cpp.

References m_break_loc_collection, and m_collection_mutex.

Member Data Documentation

◆ m_break_loc_collection

◆ m_collection_mutex

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

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