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 AdaptedIterable< collection, lldb::BreakpointLocationSP, vector_adapter > | 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 AdaptedIterable<collection, lldb::BreakpointLocationSP, vector_adapter> lldb_private::BreakpointLocationList::BreakpointLocationIterable |
Definition at line 209 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 22 of file BreakpointLocationList.cpp.
|
protected |
Definition at line 207 of file BreakpointLocationList.cpp.
References lldb_private::BreakpointLocationCollection::Add(), Create(), FindByAddress(), m_mutex, and m_new_location_recorder.
Referenced by lldb_private::Breakpoint::AddLocation().
|
inline |
Definition at line 211 of file BreakpointLocationList.h.
References m_locations.
Referenced by lldb_private::Breakpoint::ModuleReplaced(), and lldb_private::Breakpoint::ModulesChanged().
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 m_locations, and m_mutex.
Referenced by lldb_private::Breakpoint::ClearAllBreakpointSites(), and lldb_private::Breakpoint::SetEnabled().
|
protected |
Definition at line 308 of file BreakpointLocationList.cpp.
References m_locations, and m_next_id.
Referenced by lldb_private::Breakpoint::ModuleReplaced().
|
protected |
Definition at line 28 of file BreakpointLocationList.cpp.
References lldb_private::Breakpoint::IsHardware(), 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 96 of file BreakpointLocationList.cpp.
References lldb_private::Address::GetOffset(), lldb_private::Target::GetSectionLoadList(), lldb_private::Breakpoint::GetTarget(), lldb_private::Address::IsSectionOffset(), lldb_private::Address::IsValid(), m_address_to_location, m_locations, m_mutex, m_owner, and lldb_private::SectionLoadList::ResolveLoadAddress().
Referenced by AddLocation(), FindIDByAddress(), and lldb_private::Breakpoint::FindLocationByAddress().
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 68 of file BreakpointLocationList.cpp.
References Compare(), m_locations, and m_mutex.
Referenced by lldb_private::Breakpoint::FindLocationByID(), and 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 55 of file BreakpointLocationList.cpp.
References FindByAddress(), and LLDB_INVALID_BREAK_ID.
Referenced by lldb_private::Breakpoint::FindLocationIDByAddress().
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 79 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.
Referenced by lldb_private::Breakpoint::GetLocationAtIndex(), and lldb_private::Breakpoint::ModulesChanged().
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 196 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 170 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 185 of file BreakpointLocationList.cpp.
References m_locations, and m_mutex.
Referenced by lldb_private::Breakpoint::GetNumResolvedLocations().
|
inline |
Returns the number of elements in this breakpoint location list.
Definition at line 149 of file BreakpointLocationList.h.
References m_locations.
Referenced by lldb_private::Breakpoint::GetNumLocations(), and lldb_private::Breakpoint::ModulesChanged().
|
protected |
Definition at line 266 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().
Referenced by lldb_private::Breakpoint::RemoveInvalidLocations().
|
protected |
Definition at line 242 of file BreakpointLocationList.cpp.
References m_address_to_location, m_locations, m_mutex, and RemoveLocationByIndex().
Referenced by lldb_private::Breakpoint::ModuleReplaced(), lldb_private::Breakpoint::ModulesChanged(), and SwapLocation().
|
protected |
Definition at line 260 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 179 of file BreakpointLocationList.cpp.
References m_locations, and m_mutex.
Referenced by lldb_private::Breakpoint::ResetHitCount().
void BreakpointLocationList::ResolveAllBreakpointSites | ( | ) |
Tells all the breakpoint locations in this list to attempt to resolve any possible breakpoint sites.
Definition at line 160 of file BreakpointLocationList.cpp.
References m_locations, and m_mutex.
Referenced by lldb_private::Breakpoint::SetEnabled().
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 41 of file BreakpointLocationList.cpp.
References FindByID().
|
protected |
Definition at line 296 of file BreakpointLocationList.cpp.
References m_mutex, and m_new_location_recorder.
Referenced by lldb_private::Breakpoint::ResolveBreakpointInModules().
|
protected |
Definition at line 303 of file BreakpointLocationList.cpp.
References m_mutex, and m_new_location_recorder.
Referenced by lldb_private::Breakpoint::ResolveBreakpointInModules().
|
protected |
Definition at line 229 of file BreakpointLocationList.cpp.
References m_address_to_location, and RemoveLocation().
Referenced by lldb_private::Breakpoint::ModuleReplaced().
|
friend |
Definition at line 32 of file BreakpointLocationList.h.
|
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(), 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(), GetDescription(), GetHitCount(), GetNumResolvedLocations(), RemoveInvalidLocations(), RemoveLocation(), ResetHitCount(), ResolveAllBreakpointSites(), StartRecordingNewLocations(), and StopRecordingNewLocations().
|
protected |
Definition at line 204 of file BreakpointLocationList.h.
Referenced by AddLocation(), StartRecordingNewLocations(), and StopRecordingNewLocations().
|
protected |
Definition at line 203 of file BreakpointLocationList.h.
|
protected |
Definition at line 199 of file BreakpointLocationList.h.
Referenced by Create(), and FindByAddress().