LLDB mainline
|
"lldb/Breakpoint/BreakpointSiteList.h" Class that manages lists of BreakpointSite shared pointers. More...
#include <BreakpointSiteList.h>
Public Types | |
typedef void(* | BreakpointSiteSPMapFunc) (lldb::BreakpointSiteSP &bp, void *baton) |
Public Member Functions | |
BreakpointSiteList () | |
Default constructor makes an empty list. | |
~BreakpointSiteList () | |
Destructor, currently does nothing. | |
lldb::break_id_t | Add (const lldb::BreakpointSiteSP &bp_site_sp) |
Add a BreakpointSite to the list. | |
void | Dump (Stream *s) const |
Standard Dump routine, doesn't do anything at present. | |
lldb::BreakpointSiteSP | FindByAddress (lldb::addr_t addr) |
Returns a shared pointer to the breakpoint site at address addr. | |
lldb::BreakpointSiteSP | FindByID (lldb::break_id_t breakID) |
Returns a shared pointer to the breakpoint site with id breakID. | |
const lldb::BreakpointSiteSP | FindByID (lldb::break_id_t breakID) const |
Returns a shared pointer to the breakpoint site with id breakID - const version. | |
lldb::break_id_t | FindIDByAddress (lldb::addr_t addr) |
Returns the breakpoint site id to the breakpoint site at address addr. | |
bool | BreakpointSiteContainsBreakpoint (lldb::break_id_t bp_site_id, lldb::break_id_t bp_id) |
Returns whether the breakpoint site bp_site_id has bp_id. | |
void | ForEach (std::function< void(BreakpointSite *)> const &callback) |
bool | Remove (lldb::break_id_t breakID) |
Removes the breakpoint site given by breakID from this list. | |
bool | RemoveByAddress (lldb::addr_t addr) |
Removes the breakpoint site at address addr from this list. | |
bool | FindInRange (lldb::addr_t lower_bound, lldb::addr_t upper_bound, BreakpointSiteList &bp_site_list) const |
bool | ShouldStop (StoppointCallbackContext *context, lldb::break_id_t breakID) |
Enquires of the breakpoint site on in this list with ID breakID whether we should stop for the breakpoint or not. | |
size_t | GetSize () const |
Returns the number of elements in the list. | |
bool | IsEmpty () const |
Protected Types | |
typedef std::map< lldb::addr_t, lldb::BreakpointSiteSP > | collection |
Protected Member Functions | |
collection::iterator | GetIDIterator (lldb::break_id_t breakID) |
collection::const_iterator | GetIDConstIterator (lldb::break_id_t breakID) const |
Protected Attributes | |
std::recursive_mutex | m_mutex |
collection | m_bp_site_list |
Friends | |
class | Process |
"lldb/Breakpoint/BreakpointSiteList.h" Class that manages lists of BreakpointSite shared pointers.
Definition at line 23 of file BreakpointSiteList.h.
typedef void(* lldb_private::BreakpointSiteList::BreakpointSiteSPMapFunc) (lldb::BreakpointSiteSP &bp, void *baton) |
Definition at line 130 of file BreakpointSiteList.h.
|
protected |
Definition at line 161 of file BreakpointSiteList.h.
|
default |
Default constructor makes an empty list.
|
default |
Destructor, currently does nothing.
lldb::break_id_t BreakpointSiteList::Add | ( | const lldb::BreakpointSiteSP & | bp_site_sp | ) |
Add a BreakpointSite to the list.
[in] | bp_site_sp | A shared pointer to a breakpoint site being added to the list. |
Definition at line 24 of file BreakpointSiteList.cpp.
References LLDB_INVALID_BREAK_ID, m_bp_site_list, and m_mutex.
Referenced by lldb_private::Process::CreateBreakpointSite(), and FindInRange().
bool BreakpointSiteList::BreakpointSiteContainsBreakpoint | ( | lldb::break_id_t | bp_site_id, |
lldb::break_id_t | bp_id | ||
) |
Returns whether the breakpoint site bp_site_id has bp_id.
[in] | bp_site_id | The breakpoint site id to query. |
[in] | bp_id | The breakpoint id to look for in bp_site_id. |
Definition at line 134 of file BreakpointSiteList.cpp.
References GetIDConstIterator(), m_bp_site_list, and m_mutex.
Referenced by lldb_private::ItaniumABILanguageRuntime::ExceptionBreakpointsExplainStop(), and lldb_private::AppleObjCRuntime::ExceptionBreakpointsExplainStop().
void BreakpointSiteList::Dump | ( | Stream * | s | ) | const |
Standard Dump routine, doesn't do anything at present.
[in] | s | Stream into which to dump the description. |
Definition at line 144 of file BreakpointSiteList.cpp.
References lldb_private::Stream::IndentLess(), lldb_private::Stream::IndentMore(), m_bp_site_list, and lldb_private::Stream::Printf().
BreakpointSiteSP BreakpointSiteList::FindByAddress | ( | lldb::addr_t | addr | ) |
Returns a shared pointer to the breakpoint site at address addr.
[in] | addr | The address to look for. |
Definition at line 125 of file BreakpointSiteList.cpp.
References m_bp_site_list, and m_mutex.
Referenced by lldb_private::Process::CreateBreakpointSite(), lldb_private::ThreadPlanStepOverBreakpoint::DoWillResume(), FindIDByAddress(), and lldb_private::ThreadPlanStepOverBreakpoint::ReenableBreakpointSite().
BreakpointSiteSP BreakpointSiteList::FindByID | ( | lldb::break_id_t | breakID | ) |
Returns a shared pointer to the breakpoint site with id breakID.
[in] | breakID | The breakpoint site ID to seek for. |
Definition at line 104 of file BreakpointSiteList.cpp.
References GetIDIterator(), m_bp_site_list, and m_mutex.
Referenced by lldb_private::ThreadPlanStepUntil::AnalyzeStop(), lldb_private::Process::DisableBreakpointSiteByID(), CommandObjectProcessContinue::DoExecute(), lldb_private::ThreadPlanCallFunction::DoPlanExplainsStop(), lldb_private::ThreadPlanStepOut::DoPlanExplainsStop(), lldb_private::Process::EnableBreakpointSiteByID(), lldb::SBThread::GetStopReasonDataAtIndex(), lldb::SBThread::GetStopReasonDataCount(), lldb_private::ThreadPlanStepThrough::HitOurBackstopBreakpoint(), lldb_private::ThreadPlanStepRange::NextRangeBreakpointExplainsStop(), and ShouldStop().
const BreakpointSiteSP BreakpointSiteList::FindByID | ( | lldb::break_id_t | breakID | ) | const |
Returns a shared pointer to the breakpoint site with id breakID - const version.
[in] | breakID | The breakpoint site ID to seek for. |
Definition at line 115 of file BreakpointSiteList.cpp.
References GetIDConstIterator(), m_bp_site_list, and m_mutex.
lldb::break_id_t BreakpointSiteList::FindIDByAddress | ( | lldb::addr_t | addr | ) |
Returns the breakpoint site id to the breakpoint site at address addr.
[in] | addr | The address to match. |
Definition at line 50 of file BreakpointSiteList.cpp.
References FindByAddress(), and LLDB_INVALID_BREAK_ID.
bool BreakpointSiteList::FindInRange | ( | lldb::addr_t | lower_bound, |
lldb::addr_t | upper_bound, | ||
BreakpointSiteList & | bp_site_list | ||
) | const |
Definition at line 164 of file BreakpointSiteList.cpp.
References Add(), m_bp_site_list, and m_mutex.
Referenced by lldb_private::Process::RemoveBreakpointOpcodesFromBuffer(), and lldb_private::Process::WriteMemory().
void BreakpointSiteList::ForEach | ( | std::function< void(BreakpointSite *)> const & | callback | ) |
Definition at line 157 of file BreakpointSiteList.cpp.
References m_bp_site_list, and m_mutex.
Referenced by lldb_private::process_gdb_remote::ProcessGDBRemote::DidForkSwitchHardwareTraps(), lldb_private::process_gdb_remote::ProcessGDBRemote::DidForkSwitchSoftwareBreakpoints(), lldb_private::Process::DisableAllBreakpointSites(), lldb_private::Process::RemoveBreakpointOpcodesFromBuffer(), and lldb_private::Process::WriteMemory().
|
protected |
Definition at line 97 of file BreakpointSiteList.cpp.
References m_bp_site_list, and m_mutex.
Referenced by BreakpointSiteContainsBreakpoint(), and FindByID().
|
protected |
Definition at line 89 of file BreakpointSiteList.cpp.
References m_bp_site_list, and m_mutex.
Referenced by FindByID(), and Remove().
|
inline |
Returns the number of elements in the list.
Definition at line 150 of file BreakpointSiteList.h.
References m_bp_site_list, and m_mutex.
|
inline |
Definition at line 155 of file BreakpointSiteList.h.
References m_bp_site_list, and m_mutex.
Referenced by lldb_private::Process::WriteMemory().
bool BreakpointSiteList::Remove | ( | lldb::break_id_t | breakID | ) |
Removes the breakpoint site given by breakID from this list.
[in] | breakID | The breakpoint site index to remove. |
Definition at line 56 of file BreakpointSiteList.cpp.
References GetIDIterator(), m_bp_site_list, and m_mutex.
Referenced by lldb_private::Process::ClearBreakpointSiteByID().
bool BreakpointSiteList::RemoveByAddress | ( | lldb::addr_t | addr | ) |
Removes the breakpoint site at address addr from this list.
[in] | addr | The address from which to remove a breakpoint site. |
Definition at line 66 of file BreakpointSiteList.cpp.
References m_bp_site_list, and m_mutex.
Referenced by lldb_private::Process::RemoveOwnerFromBreakpointSite().
bool BreakpointSiteList::ShouldStop | ( | StoppointCallbackContext * | context, |
lldb::break_id_t | breakID | ||
) |
Enquires of the breakpoint site on in this list with ID breakID whether we should stop for the breakpoint or not.
[in] | context | This contains the information about this stop. |
[in] | breakID | This break ID that we hit. |
Definition at line 37 of file BreakpointSiteList.cpp.
References FindByID().
|
friend |
Definition at line 27 of file BreakpointSiteList.h.
|
protected |
Definition at line 168 of file BreakpointSiteList.h.
Referenced by Add(), BreakpointSiteContainsBreakpoint(), Dump(), FindByAddress(), FindByID(), FindInRange(), ForEach(), GetIDConstIterator(), GetIDIterator(), GetSize(), IsEmpty(), Remove(), and RemoveByAddress().
|
mutableprotected |
Definition at line 167 of file BreakpointSiteList.h.
Referenced by Add(), BreakpointSiteContainsBreakpoint(), FindByAddress(), FindByID(), FindInRange(), ForEach(), GetIDConstIterator(), GetIDIterator(), GetSize(), IsEmpty(), Remove(), and RemoveByAddress().