26 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
27 collection::iterator iter =
m_bp_site_list.find(bp_site_load_addr);
30 m_bp_site_list.insert(iter, collection::value_type(bp_site_load_addr, bp));
44 return site_sp->ShouldStop(context);
52 return bp.get()->GetID();
57 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
67 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
80 bool operator()(std::pair<lldb::addr_t, BreakpointSiteSP> val_pair)
const {
81 return m_break_id == val_pair.second->GetID();
88BreakpointSiteList::collection::iterator
90 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
96BreakpointSiteList::collection::const_iterator
98 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
105 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
109 stop_sp = pos->second;
116 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
120 stop_sp = pos->second;
127 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
130 found_sp = iter->second;
136 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
139 return pos->second->IsBreakpointAtThisSite(bp_id);
145 s->
Printf(
"%p: ",
static_cast<const void *
>(
this));
147 s->
Printf(
"BreakpointSiteList with %u BreakpointSites:\n",
150 collection::const_iterator pos;
153 pos->second->Dump(s);
159 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
161 callback(pair.second.get());
167 if (lower_bound > upper_bound)
170 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
171 collection::const_iterator lower, upper, pos;
173 if (lower ==
m_bp_site_list.end() || (*lower).first >= upper_bound)
180 collection::const_iterator prev_pos = lower;
183 if (prev_bp->GetLoadAddress() + prev_bp->GetByteSize() > lower_bound)
184 bp_site_list.
Add(prev_bp);
189 for (pos = lower; pos != upper; pos++) {
190 bp_site_list.
Add((*pos).second);
BreakpointSiteIDMatches(lldb::break_id_t break_id)
bool operator()(std::pair< lldb::addr_t, BreakpointSiteSP > val_pair) const
const lldb::break_id_t m_break_id
"lldb/Breakpoint/BreakpointSiteList.h" Class that manages lists of BreakpointSite shared pointers.
void Dump(Stream *s) const
Standard Dump routine, doesn't do anything at present.
BreakpointSiteList()
Default constructor makes an empty list.
bool FindInRange(lldb::addr_t lower_bound, lldb::addr_t upper_bound, BreakpointSiteList &bp_site_list) const
collection::iterator GetIDIterator(lldb::break_id_t breakID)
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.
collection m_bp_site_list
~BreakpointSiteList()
Destructor, currently does nothing.
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.
collection::const_iterator GetIDConstIterator(lldb::break_id_t breakID) const
lldb::break_id_t FindIDByAddress(lldb::addr_t addr)
Returns the breakpoint site id to the breakpoint site at address addr.
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 breakp...
void ForEach(std::function< void(BreakpointSite *)> const &callback)
std::recursive_mutex m_mutex
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.
lldb::break_id_t Add(const lldb::BreakpointSiteSP &bp_site_sp)
Add a BreakpointSite to the list.
Class that manages the actual breakpoint that will be inserted into the running program.
General Outline: When we hit a breakpoint we need to package up whatever information is needed to eva...
A stream class that can stream formatted output to a file.
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
void IndentLess(unsigned amount=2)
Decrement the current indentation level.
void IndentMore(unsigned amount=2)
Increment the current indentation level.
#define LLDB_INVALID_BREAK_ID
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::BreakpointSite > BreakpointSiteSP