LLDB mainline
|
"lldb/Breakpoint/BreakpointLocationList.h" This class is used by Breakpoint to manage a list of breakpoint locations, each breakpoint location in the list has a unique ID, and is unique by Address as well. More...
#include <BreakpointLocationList.h>
Public Types | |
typedef llvm::iterator_range< collection::const_iterator > | BreakpointLocationIterable |
Public Member Functions | |
virtual | ~BreakpointLocationList () |
void | Dump (Stream *s) const |
Standard "Dump" method. At present it does nothing. | |
const lldb::BreakpointLocationSP | FindByAddress (const Address &addr) const |
Returns a shared pointer to the breakpoint location at address addr - const version. | |
lldb::BreakpointLocationSP | FindByID (lldb::break_id_t breakID) const |
Returns a shared pointer to the breakpoint location with id breakID, const version. | |
lldb::break_id_t | FindIDByAddress (const Address &addr) |
Returns the breakpoint location id to the breakpoint location at address addr. | |
size_t | FindInModule (Module *module, BreakpointLocationCollection &bp_loc_list) |
Returns a breakpoint location list of the breakpoint locations in the module module. | |
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. | |
void | ClearAllBreakpointSites () |
Removes all the locations in this list from their breakpoint site owners list. | |
void | ResolveAllBreakpointSites () |
Tells all the breakpoint locations in this list to attempt to resolve any possible breakpoint sites. | |
size_t | GetNumResolvedLocations () const |
Returns the number of breakpoint locations in this list with resolved breakpoints. | |
uint32_t | GetHitCount () const |
Returns the number hit count of all locations in this list. | |
void | ResetHitCount () |
Resets the hit count of all locations in this list. | |
bool | ShouldStop (StoppointCallbackContext *context, lldb::break_id_t breakID) |
Enquires of the breakpoint location in this list with ID breakID whether we should stop. | |
size_t | GetSize () const |
Returns the number of elements in this breakpoint location list. | |
void | GetDescription (Stream *s, lldb::DescriptionLevel level) |
Print a description of the breakpoint locations in this list to the stream s. | |
BreakpointLocationIterable | BreakpointLocations () |
Protected Types | |
typedef std::vector< lldb::BreakpointLocationSP > | collection |
typedef std::map< lldb_private::Address, lldb::BreakpointLocationSP, Address::ModulePointerAndOffsetLessThanFunctionObject > | addr_map |
Protected Member Functions | |
BreakpointLocationList (Breakpoint &owner) | |
This is the standard constructor. | |
lldb::BreakpointLocationSP | Create (const Address &addr, bool resolve_indirect_symbols) |
void | StartRecordingNewLocations (BreakpointLocationCollection &new_locations) |
void | StopRecordingNewLocations () |
lldb::BreakpointLocationSP | AddLocation (const Address &addr, bool resolve_indirect_symbols, bool *new_location=nullptr) |
void | SwapLocation (lldb::BreakpointLocationSP to_location_sp, lldb::BreakpointLocationSP from_location_sp) |
bool | RemoveLocation (const lldb::BreakpointLocationSP &bp_loc_sp) |
void | RemoveLocationByIndex (size_t idx) |
void | RemoveInvalidLocations (const ArchSpec &arch) |
void | Compact () |
Protected Attributes | |
Breakpoint & | m_owner |
collection | m_locations |
addr_map | m_address_to_location |
std::recursive_mutex | m_mutex |
lldb::break_id_t | m_next_id |
BreakpointLocationCollection * | m_new_location_recorder |
Friends | |
class | Breakpoint |
"lldb/Breakpoint/BreakpointLocationList.h" This class is used by Breakpoint to manage a list of breakpoint locations, each breakpoint location in the list has a unique ID, and is unique by Address as well.
Definition at line 26 of file BreakpointLocationList.h.
|
protected |
Definition at line 197 of file BreakpointLocationList.h.
typedef llvm::iterator_range<collection::const_iterator> lldb_private::BreakpointLocationList::BreakpointLocationIterable |
Definition at line 208 of file BreakpointLocationList.h.
|
protected |
Definition at line 194 of file BreakpointLocationList.h.
|
virtualdefault |
|
protected |
This is the standard constructor.
It creates an empty breakpoint location list. It is protected here because only Breakpoints are allowed to create the breakpoint location list.
Definition at line 24 of file BreakpointLocationList.cpp.
References Breakpoint, m_new_location_recorder, m_next_id, and m_owner.
|
protected |
Definition at line 214 of file BreakpointLocationList.cpp.
References lldb_private::Breakpoints, Create(), error(), FindByAddress(), lldb_private::GetLog(), LLDB_LOG_ERROR, m_mutex, and m_new_location_recorder.
|
inline |
Definition at line 210 of file BreakpointLocationList.h.
References m_locations.
void BreakpointLocationList::ClearAllBreakpointSites | ( | ) |
Removes all the locations in this list from their breakpoint site owners list.
Definition at line 153 of file BreakpointLocationList.cpp.
References lldb_private::Breakpoints, error(), lldb_private::GetLog(), LLDB_LOG_ERROR, m_locations, and m_mutex.
|
protected |
Definition at line 316 of file BreakpointLocationList.cpp.
References m_locations, and m_next_id.
|
protected |
Definition at line 30 of file BreakpointLocationList.cpp.
References LLDB_INVALID_THREAD_ID, m_address_to_location, m_locations, m_mutex, m_next_id, and m_owner.
Referenced by AddLocation().
void BreakpointLocationList::Dump | ( | Stream * | s | ) | const |
Standard "Dump" method. At present it does nothing.
Definition at line 122 of file BreakpointLocationList.cpp.
References lldb_private::Stream::IndentLess(), lldb_private::Stream::IndentMore(), m_locations, m_mutex, and lldb_private::Stream::Printf().
const BreakpointLocationSP BreakpointLocationList::FindByAddress | ( | const Address & | addr | ) | const |
Returns a shared pointer to the breakpoint location at address addr - const version.
[in] | addr | The address to look for. |
Definition at line 97 of file BreakpointLocationList.cpp.
References lldb_private::Address::GetOffset(), lldb_private::Address::IsSectionOffset(), lldb_private::Address::IsValid(), m_address_to_location, m_locations, m_mutex, and m_owner.
Referenced by AddLocation(), and FindIDByAddress().
BreakpointLocationSP BreakpointLocationList::FindByID | ( | lldb::break_id_t | breakID | ) | const |
Returns a shared pointer to the breakpoint location with id breakID, const version.
[in] | breakID | The breakpoint location ID to seek for. |
Definition at line 70 of file BreakpointLocationList.cpp.
References Compare(), m_locations, and m_mutex.
Referenced by ShouldStop().
lldb::break_id_t BreakpointLocationList::FindIDByAddress | ( | const Address & | addr | ) |
Returns the breakpoint location id to the breakpoint location at address addr.
[in] | addr | The address to match. |
Definition at line 57 of file BreakpointLocationList.cpp.
References FindByAddress(), and LLDB_INVALID_BREAK_ID.
size_t BreakpointLocationList::FindInModule | ( | Module * | module, |
BreakpointLocationCollection & | bp_loc_list ) |
Returns a breakpoint location list of the breakpoint locations in the module module.
This list is allocated, and owned by the caller.
[in] | module | The module to seek in. |
[in] | bp_loc_list | A breakpoint collection that gets any breakpoint locations that match module appended to. |
Definition at line 80 of file BreakpointLocationList.cpp.
References lldb_private::BreakpointLocationCollection::Add(), lldb_private::BreakpointLocationCollection::GetSize(), m_locations, and m_mutex.
BreakpointLocationSP BreakpointLocationList::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 135 of file BreakpointLocationList.cpp.
References m_locations, and m_mutex.
const BreakpointLocationSP BreakpointLocationList::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 144 of file BreakpointLocationList.cpp.
References m_locations, and m_mutex.
void BreakpointLocationList::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 203 of file BreakpointLocationList.cpp.
References m_locations, m_mutex, and lldb_private::Stream::Printf().
uint32_t BreakpointLocationList::GetHitCount | ( | ) | const |
Returns the number hit count of all locations in this list.
Definition at line 177 of file BreakpointLocationList.cpp.
References m_locations, and m_mutex.
size_t BreakpointLocationList::GetNumResolvedLocations | ( | ) | const |
Returns the number of breakpoint locations in this list with resolved breakpoints.
Definition at line 192 of file BreakpointLocationList.cpp.
References m_locations, and m_mutex.
|
inline |
Returns the number of elements in this breakpoint location list.
Definition at line 149 of file BreakpointLocationList.h.
References m_locations.
|
protected |
Definition at line 274 of file BreakpointLocationList.cpp.
References lldb_private::BreakpointLocation::GetAddress(), lldb_private::Address::GetModule(), lldb_private::ArchSpec::IsCompatibleMatch(), lldb_private::ArchSpec::IsValid(), m_locations, m_mutex, RemoveLocationByIndex(), and lldb_private::Address::SectionWasDeleted().
|
protected |
Definition at line 250 of file BreakpointLocationList.cpp.
References m_address_to_location, m_locations, m_mutex, and RemoveLocationByIndex().
Referenced by SwapLocation().
|
protected |
Definition at line 268 of file BreakpointLocationList.cpp.
References m_address_to_location, and m_locations.
Referenced by RemoveInvalidLocations(), and RemoveLocation().
void BreakpointLocationList::ResetHitCount | ( | ) |
Resets the hit count of all locations in this list.
Definition at line 186 of file BreakpointLocationList.cpp.
References m_locations, and m_mutex.
void BreakpointLocationList::ResolveAllBreakpointSites | ( | ) |
Tells all the breakpoint locations in this list to attempt to resolve any possible breakpoint sites.
Definition at line 164 of file BreakpointLocationList.cpp.
References lldb_private::Breakpoints, error(), lldb_private::GetLog(), LLDB_LOG_ERROR, m_locations, and m_mutex.
bool BreakpointLocationList::ShouldStop | ( | StoppointCallbackContext * | context, |
lldb::break_id_t | breakID ) |
Enquires of the breakpoint location in this list with ID breakID whether we should stop.
[in] | context | This contains the information about this stop. |
[in] | breakID | This break ID that we hit. |
Definition at line 43 of file BreakpointLocationList.cpp.
References FindByID().
|
protected |
Definition at line 304 of file BreakpointLocationList.cpp.
References m_mutex, and m_new_location_recorder.
|
protected |
Definition at line 311 of file BreakpointLocationList.cpp.
References m_mutex, and m_new_location_recorder.
|
protected |
Definition at line 237 of file BreakpointLocationList.cpp.
References m_address_to_location, and RemoveLocation().
|
friend |
Definition at line 32 of file BreakpointLocationList.h.
References Breakpoint.
Referenced by Breakpoint, and BreakpointLocationList().
|
protected |
Definition at line 201 of file BreakpointLocationList.h.
Referenced by Create(), FindByAddress(), RemoveLocation(), RemoveLocationByIndex(), and SwapLocation().
|
protected |
Definition at line 200 of file BreakpointLocationList.h.
Referenced by BreakpointLocations(), ClearAllBreakpointSites(), Compact(), Create(), Dump(), FindByAddress(), FindByID(), FindInModule(), GetByIndex(), GetByIndex(), GetDescription(), GetHitCount(), GetNumResolvedLocations(), GetSize(), RemoveInvalidLocations(), RemoveLocation(), RemoveLocationByIndex(), ResetHitCount(), and ResolveAllBreakpointSites().
|
mutableprotected |
Definition at line 202 of file BreakpointLocationList.h.
Referenced by AddLocation(), ClearAllBreakpointSites(), Create(), Dump(), FindByAddress(), FindByID(), FindInModule(), GetByIndex(), GetByIndex(), GetDescription(), GetHitCount(), GetNumResolvedLocations(), RemoveInvalidLocations(), RemoveLocation(), ResetHitCount(), ResolveAllBreakpointSites(), StartRecordingNewLocations(), and StopRecordingNewLocations().
|
protected |
Definition at line 204 of file BreakpointLocationList.h.
Referenced by AddLocation(), BreakpointLocationList(), StartRecordingNewLocations(), and StopRecordingNewLocations().
|
protected |
Definition at line 203 of file BreakpointLocationList.h.
Referenced by BreakpointLocationList(), Compact(), and Create().
|
protected |
Definition at line 199 of file BreakpointLocationList.h.
Referenced by BreakpointLocationList(), Create(), and FindByAddress().