|
LLDB mainline
|
#include <BreakpointLocationCollection.h>
Public Types | |
| typedef llvm::iterator_range< collection::const_iterator > | BreakpointLocationCollectionIterable |
Public Member Functions | |
| BreakpointLocationCollection (bool preserving=false) | |
| Breakpoint locations don't keep their breakpoint owners alive, so neither will a collection of breakpoint locations. | |
| ~BreakpointLocationCollection () | |
| BreakpointLocationCollection & | operator= (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, BreakpointLocationCollection &stopped_bp_locs) |
| 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::BreakpointLocationSP > | collection |
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 |
| const bool | m_preserving_bkpts = false |
| These are used if we're preserving breakpoints in this list: | |
| std::map< std::pair< lldb::break_id_t, lldb::break_id_t >, lldb::BreakpointSP > | m_preserved_bps |
Definition at line 21 of file BreakpointLocationCollection.h.
| typedef llvm::iterator_range<collection::const_iterator> lldb_private::BreakpointLocationCollection::BreakpointLocationCollectionIterable |
Definition at line 183 of file BreakpointLocationCollection.h.
|
private |
Definition at line 165 of file BreakpointLocationCollection.h.
| BreakpointLocationCollection::BreakpointLocationCollection | ( | bool | preserving = false | ) |
Breakpoint locations don't keep their breakpoint owners alive, so neither will a collection of breakpoint locations.
However, if you need to use this collection in a context where some of the breakpoints whose locations are in the collection might get deleted during its lifespan, then you need to make sure the breakpoints don't get deleted out from under you. To do that, pass true for preserving, and so long as there is a location for a given breakpoint in the collection, the breakpoint will not get destroyed.
Definition at line 20 of file BreakpointLocationCollection.cpp.
References m_preserving_bkpts.
Referenced by operator=(), ShouldStop(), and ~BreakpointLocationCollection().
|
default |
References BreakpointLocationCollection().
| void BreakpointLocationCollection::Add | ( | const lldb::BreakpointLocationSP & | bp_loc_sp | ) |
Add the breakpoint bp_loc_sp to the list.
| [in] | bp_loc_sp | Shared pointer to the breakpoint location that will get added to the list. |
Definition at line 26 of file BreakpointLocationCollection.cpp.
References FindByIDPair(), lldb_private::Stoppoint::GetID(), m_break_loc_collection, m_collection_mutex, m_preserved_bps, and m_preserving_bkpts.
Referenced by lldb_private::BreakpointSite::CopyConstituentsList(), lldb_private::BreakpointLocationList::FindInModule(), lldb_private::Breakpoint::ModuleReplaced(), lldb_private::Breakpoint::ModulesChanged(), lldb_private::StopInfoBreakpoint::PerformAction(), and ShouldStop().
|
inline |
Definition at line 184 of file BreakpointLocationCollection.h.
References m_break_loc_collection.
Referenced by lldb_private::Breakpoint::ModuleReplaced().
| 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.
| [in] | break_id | The breakpoint ID to seek for. |
| [in] | break_loc_id | The breakpoint location ID in break_id to seek for. |
Definition at line 98 of file BreakpointLocationCollection.cpp.
References GetIDPairIterator(), and m_break_loc_collection.
Referenced by Add(), and lldb_private::Breakpoint::ModuleReplaced().
| 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.
| [in] | break_id | The breakpoint location ID to seek for. |
| [in] | break_loc_id | The breakpoint location ID in break_id to seek for. |
Definition at line 108 of file BreakpointLocationCollection.cpp.
References GetIDPairConstIterator(), and m_break_loc_collection.
| BreakpointLocationSP BreakpointLocationCollection::GetByIndex | ( | size_t | i | ) |
Returns a shared pointer to the breakpoint location with index i.
| [in] | i | The breakpoint location index to seek for. |
Definition at line 119 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().
| const BreakpointLocationSP BreakpointLocationCollection::GetByIndex | ( | size_t | i | ) | const |
Returns a shared pointer to the breakpoint location with index i, const version.
| [in] | i | The breakpoint location index to seek for. |
Definition at line 129 of file BreakpointLocationCollection.cpp.
References m_break_loc_collection, and m_collection_mutex.
| void BreakpointLocationCollection::GetDescription | ( | Stream * | s, |
| lldb::DescriptionLevel | level ) |
Print a description of the breakpoint locations in this list to the stream s.
| [in] | s | The stream to which to print the description. |
| [in] | level | The description level that indicates the detail level to provide. |
Definition at line 198 of file BreakpointLocationCollection.cpp.
References m_break_loc_collection, m_collection_mutex, and lldb_private::Stream::PutChar().
|
private |
Definition at line 90 of file BreakpointLocationCollection.cpp.
References m_break_loc_collection.
Referenced by FindByIDPair().
|
private |
Definition at line 82 of file BreakpointLocationCollection.cpp.
References m_break_loc_collection.
Referenced by FindByIDPair(), and Remove().
|
inline |
Returns the number of elements in this breakpoint location list.
Definition at line 113 of file BreakpointLocationCollection.h.
References m_break_loc_collection.
Referenced by lldb_private::BreakpointSite::CopyConstituentsList(), CommandObjectBreakpointClear::DoExecute(), lldb_private::BreakpointLocationList::FindInModule(), lldb_private::Breakpoint::BreakpointEventData::GetNumBreakpointLocationsFromEvent(), lldb_private::Breakpoint::ModuleReplaced(), lldb_private::Breakpoint::ModulesChanged(), lldb_private::StopInfoBreakpoint::PerformAction(), and ShouldStop().
| bool BreakpointLocationCollection::IsInternal | ( | ) | const |
Tell whether ALL the breakpoints in the location collection are internal.
Definition at line 182 of file BreakpointLocationCollection.cpp.
References m_break_loc_collection, and m_collection_mutex.
| BreakpointLocationCollection & BreakpointLocationCollection::operator= | ( | const BreakpointLocationCollection & | rhs | ) |
Definition at line 211 of file BreakpointLocationCollection.cpp.
References BreakpointLocationCollection(), m_break_loc_collection, and m_collection_mutex.
| 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.
| [in] | break_id | The breakpoint index to remove. |
| [in] | break_loc_id | The breakpoint location index in break_id to remove. |
Definition at line 45 of file BreakpointLocationCollection.cpp.
References GetIDPairIterator(), m_break_loc_collection, m_collection_mutex, m_preserved_bps, and m_preserving_bkpts.
| bool BreakpointLocationCollection::ShouldStop | ( | StoppointCallbackContext * | context, |
| BreakpointLocationCollection & | stopped_bp_locs ) |
Enquires of all the breakpoint locations in this list whether we should stop at a hit at breakID.
| [in] | context | This contains the information about this stop. |
Definition at line 138 of file BreakpointLocationCollection.cpp.
References Add(), BreakpointLocationCollection(), GetByIndex(), and GetSize().
Referenced by lldb_private::BreakpointSite::ShouldStop().
Check whether this collection of breakpoint locations have any thread specifiers, and if yes, is thread_id contained in any of these specifiers.
| [in] | thread | The 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 170 of file BreakpointLocationCollection.cpp.
References m_break_loc_collection, and m_collection_mutex.
|
private |
Definition at line 174 of file BreakpointLocationCollection.h.
Referenced by Add(), BreakpointLocations(), FindByIDPair(), FindByIDPair(), GetByIndex(), GetByIndex(), GetDescription(), GetIDPairConstIterator(), GetIDPairIterator(), GetSize(), IsInternal(), operator=(), Remove(), and ValidForThisThread().
|
mutableprivate |
Definition at line 175 of file BreakpointLocationCollection.h.
Referenced by Add(), GetByIndex(), GetByIndex(), GetDescription(), IsInternal(), operator=(), Remove(), and ValidForThisThread().
|
private |
Definition at line 179 of file BreakpointLocationCollection.h.
|
private |
These are used if we're preserving breakpoints in this list:
Definition at line 177 of file BreakpointLocationCollection.h.
Referenced by Add(), BreakpointLocationCollection(), and Remove().