Raphael Isemann | 8081428 | 2020-01-24 08:23:27 +0100 | [diff] [blame] | 1 | //===-- BreakpointLocationList.cpp ----------------------------------------===// |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 2 | // |
Chandler Carruth | 2946cd7 | 2019-01-19 08:50:56 +0000 | [diff] [blame] | 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 9 | #include "lldb/Breakpoint/BreakpointLocationList.h" |
Greg Clayton | b35db63 | 2013-11-09 00:03:31 +0000 | [diff] [blame] | 10 | |
Michael Sartain | c87e752 | 2013-07-16 21:22:53 +0000 | [diff] [blame] | 11 | #include "lldb/Breakpoint/Breakpoint.h" |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 12 | #include "lldb/Breakpoint/BreakpointLocation.h" |
Greg Clayton | b35db63 | 2013-11-09 00:03:31 +0000 | [diff] [blame] | 13 | #include "lldb/Core/Module.h" |
Greg Clayton | 1f74607 | 2012-08-29 21:13:06 +0000 | [diff] [blame] | 14 | #include "lldb/Core/Section.h" |
Greg Clayton | d5944cd | 2013-12-06 01:12:00 +0000 | [diff] [blame] | 15 | #include "lldb/Target/SectionLoadList.h" |
Michael Sartain | c87e752 | 2013-07-16 21:22:53 +0000 | [diff] [blame] | 16 | #include "lldb/Target/Target.h" |
Pavel Labath | 5f19b90 | 2017-11-13 16:16:33 +0000 | [diff] [blame] | 17 | #include "lldb/Utility/ArchSpec.h" |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 18 | |
| 19 | using namespace lldb; |
| 20 | using namespace lldb_private; |
| 21 | |
Saleem Abdulrasool | 16ff860 | 2016-05-18 01:59:10 +0000 | [diff] [blame] | 22 | BreakpointLocationList::BreakpointLocationList(Breakpoint &owner) |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 23 | : m_owner(owner), m_locations(), m_address_to_location(), m_mutex(), |
| 24 | m_next_id(0), m_new_location_recorder(nullptr) {} |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 25 | |
Eugene Zelenko | 16fd751 | 2015-10-30 18:50:12 +0000 | [diff] [blame] | 26 | BreakpointLocationList::~BreakpointLocationList() = default; |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 27 | |
Greg Clayton | c0d3446 | 2011-02-05 00:38:04 +0000 | [diff] [blame] | 28 | BreakpointLocationSP |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 29 | BreakpointLocationList::Create(const Address &addr, |
| 30 | bool resolve_indirect_symbols) { |
| 31 | std::lock_guard<std::recursive_mutex> guard(m_mutex); |
| 32 | // The location ID is just the size of the location list + 1 |
| 33 | lldb::break_id_t bp_loc_id = ++m_next_id; |
| 34 | BreakpointLocationSP bp_loc_sp( |
| 35 | new BreakpointLocation(bp_loc_id, m_owner, addr, LLDB_INVALID_THREAD_ID, |
| 36 | m_owner.IsHardware(), resolve_indirect_symbols)); |
| 37 | m_locations.push_back(bp_loc_sp); |
| 38 | m_address_to_location[addr] = bp_loc_sp; |
| 39 | return bp_loc_sp; |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 40 | } |
| 41 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 42 | bool BreakpointLocationList::ShouldStop(StoppointCallbackContext *context, |
| 43 | lldb::break_id_t break_id) { |
| 44 | BreakpointLocationSP bp = FindByID(break_id); |
| 45 | if (bp) { |
| 46 | // Let the BreakpointLocation decide if it should stop here (could not have |
Adrian Prantl | 0509724 | 2018-04-30 16:49:04 +0000 | [diff] [blame] | 47 | // reached it's target hit count yet, or it could have a callback that |
| 48 | // decided it shouldn't stop (shared library loads/unloads). |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 49 | return bp->ShouldStop(context); |
| 50 | } |
Adrian Prantl | 0509724 | 2018-04-30 16:49:04 +0000 | [diff] [blame] | 51 | // We should stop here since this BreakpointLocation isn't valid anymore or |
| 52 | // it doesn't exist. |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 53 | return true; |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 54 | } |
| 55 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 56 | lldb::break_id_t BreakpointLocationList::FindIDByAddress(const Address &addr) { |
| 57 | BreakpointLocationSP bp_loc_sp = FindByAddress(addr); |
| 58 | if (bp_loc_sp) { |
| 59 | return bp_loc_sp->GetID(); |
| 60 | } |
| 61 | return LLDB_INVALID_BREAK_ID; |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 62 | } |
| 63 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 64 | static bool Compare(BreakpointLocationSP lhs, lldb::break_id_t val) { |
| 65 | return lhs->GetID() < val; |
Jim Ingham | 177553e | 2013-12-03 02:31:17 +0000 | [diff] [blame] | 66 | } |
| 67 | |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 68 | BreakpointLocationSP |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 69 | BreakpointLocationList::FindByID(lldb::break_id_t break_id) const { |
| 70 | std::lock_guard<std::recursive_mutex> guard(m_mutex); |
| 71 | collection::const_iterator end = m_locations.end(); |
| 72 | collection::const_iterator pos = |
| 73 | std::lower_bound(m_locations.begin(), end, break_id, Compare); |
| 74 | if (pos != end && (*pos)->GetID() == break_id) |
| 75 | return *(pos); |
| 76 | else |
| 77 | return BreakpointLocationSP(); |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 78 | } |
| 79 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 80 | size_t BreakpointLocationList::FindInModule( |
| 81 | Module *module, BreakpointLocationCollection &bp_loc_list) { |
| 82 | std::lock_guard<std::recursive_mutex> guard(m_mutex); |
| 83 | const size_t orig_size = bp_loc_list.GetSize(); |
| 84 | collection::iterator pos, end = m_locations.end(); |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 85 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 86 | for (pos = m_locations.begin(); pos != end; ++pos) { |
| 87 | BreakpointLocationSP break_loc = (*pos); |
| 88 | SectionSP section_sp(break_loc->GetAddress().GetSection()); |
| 89 | if (section_sp && section_sp->GetModule().get() == module) { |
| 90 | bp_loc_list.Add(break_loc); |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 91 | } |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 92 | } |
| 93 | return bp_loc_list.GetSize() - orig_size; |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 94 | } |
| 95 | |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 96 | const BreakpointLocationSP |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 97 | BreakpointLocationList::FindByAddress(const Address &addr) const { |
| 98 | std::lock_guard<std::recursive_mutex> guard(m_mutex); |
| 99 | BreakpointLocationSP bp_loc_sp; |
| 100 | if (!m_locations.empty()) { |
| 101 | Address so_addr; |
Michael Sartain | c87e752 | 2013-07-16 21:22:53 +0000 | [diff] [blame] | 102 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 103 | if (addr.IsSectionOffset()) { |
| 104 | so_addr = addr; |
| 105 | } else { |
| 106 | // Try and resolve as a load address if possible. |
| 107 | m_owner.GetTarget().GetSectionLoadList().ResolveLoadAddress( |
| 108 | addr.GetOffset(), so_addr); |
| 109 | if (!so_addr.IsValid()) { |
| 110 | // The address didn't resolve, so just set to passed in addr. |
| 111 | so_addr = addr; |
| 112 | } |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 113 | } |
| 114 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 115 | addr_map::const_iterator pos = m_address_to_location.find(so_addr); |
| 116 | if (pos != m_address_to_location.end()) |
| 117 | bp_loc_sp = pos->second; |
| 118 | } |
| 119 | |
| 120 | return bp_loc_sp; |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 121 | } |
| 122 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 123 | void BreakpointLocationList::Dump(Stream *s) const { |
| 124 | s->Printf("%p: ", static_cast<const void *>(this)); |
| 125 | // s->Indent(); |
| 126 | std::lock_guard<std::recursive_mutex> guard(m_mutex); |
| 127 | s->Printf("BreakpointLocationList with %" PRIu64 " BreakpointLocations:\n", |
| 128 | (uint64_t)m_locations.size()); |
| 129 | s->IndentMore(); |
| 130 | collection::const_iterator pos, end = m_locations.end(); |
| 131 | for (pos = m_locations.begin(); pos != end; ++pos) |
Jonas Devlieghere | 70355ac | 2019-02-12 03:47:39 +0000 | [diff] [blame] | 132 | (*pos)->Dump(s); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 133 | s->IndentLess(); |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 134 | } |
| 135 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 136 | BreakpointLocationSP BreakpointLocationList::GetByIndex(size_t i) { |
| 137 | std::lock_guard<std::recursive_mutex> guard(m_mutex); |
| 138 | BreakpointLocationSP bp_loc_sp; |
| 139 | if (i < m_locations.size()) |
| 140 | bp_loc_sp = m_locations[i]; |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 141 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 142 | return bp_loc_sp; |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 143 | } |
| 144 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 145 | const BreakpointLocationSP BreakpointLocationList::GetByIndex(size_t i) const { |
| 146 | std::lock_guard<std::recursive_mutex> guard(m_mutex); |
| 147 | BreakpointLocationSP bp_loc_sp; |
| 148 | if (i < m_locations.size()) |
| 149 | bp_loc_sp = m_locations[i]; |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 150 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 151 | return bp_loc_sp; |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 152 | } |
| 153 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 154 | void BreakpointLocationList::ClearAllBreakpointSites() { |
| 155 | std::lock_guard<std::recursive_mutex> guard(m_mutex); |
| 156 | collection::iterator pos, end = m_locations.end(); |
| 157 | for (pos = m_locations.begin(); pos != end; ++pos) |
| 158 | (*pos)->ClearBreakpointSite(); |
| 159 | } |
| 160 | |
| 161 | void BreakpointLocationList::ResolveAllBreakpointSites() { |
| 162 | std::lock_guard<std::recursive_mutex> guard(m_mutex); |
| 163 | collection::iterator pos, end = m_locations.end(); |
| 164 | |
| 165 | for (pos = m_locations.begin(); pos != end; ++pos) { |
| 166 | if ((*pos)->IsEnabled()) |
| 167 | (*pos)->ResolveBreakpointSite(); |
| 168 | } |
| 169 | } |
| 170 | |
| 171 | uint32_t BreakpointLocationList::GetHitCount() const { |
| 172 | uint32_t hit_count = 0; |
| 173 | std::lock_guard<std::recursive_mutex> guard(m_mutex); |
| 174 | collection::const_iterator pos, end = m_locations.end(); |
| 175 | for (pos = m_locations.begin(); pos != end; ++pos) |
| 176 | hit_count += (*pos)->GetHitCount(); |
| 177 | return hit_count; |
| 178 | } |
| 179 | |
| 180 | size_t BreakpointLocationList::GetNumResolvedLocations() const { |
| 181 | std::lock_guard<std::recursive_mutex> guard(m_mutex); |
| 182 | size_t resolve_count = 0; |
| 183 | collection::const_iterator pos, end = m_locations.end(); |
| 184 | for (pos = m_locations.begin(); pos != end; ++pos) { |
| 185 | if ((*pos)->IsResolved()) |
| 186 | ++resolve_count; |
| 187 | } |
| 188 | return resolve_count; |
| 189 | } |
| 190 | |
| 191 | void BreakpointLocationList::GetDescription(Stream *s, |
| 192 | lldb::DescriptionLevel level) { |
| 193 | std::lock_guard<std::recursive_mutex> guard(m_mutex); |
| 194 | collection::iterator pos, end = m_locations.end(); |
| 195 | |
| 196 | for (pos = m_locations.begin(); pos != end; ++pos) { |
| 197 | s->Printf(" "); |
| 198 | (*pos)->GetDescription(s, level); |
| 199 | } |
| 200 | } |
| 201 | |
| 202 | BreakpointLocationSP BreakpointLocationList::AddLocation( |
| 203 | const Address &addr, bool resolve_indirect_symbols, bool *new_location) { |
| 204 | std::lock_guard<std::recursive_mutex> guard(m_mutex); |
| 205 | |
| 206 | if (new_location) |
| 207 | *new_location = false; |
| 208 | BreakpointLocationSP bp_loc_sp(FindByAddress(addr)); |
| 209 | if (!bp_loc_sp) { |
| 210 | bp_loc_sp = Create(addr, resolve_indirect_symbols); |
| 211 | if (bp_loc_sp) { |
| 212 | bp_loc_sp->ResolveBreakpointSite(); |
| 213 | |
| 214 | if (new_location) |
| 215 | *new_location = true; |
| 216 | if (m_new_location_recorder) { |
| 217 | m_new_location_recorder->Add(bp_loc_sp); |
| 218 | } |
| 219 | } |
| 220 | } |
| 221 | return bp_loc_sp; |
| 222 | } |
| 223 | |
| 224 | void BreakpointLocationList::SwapLocation( |
| 225 | BreakpointLocationSP to_location_sp, |
| 226 | BreakpointLocationSP from_location_sp) { |
| 227 | if (!from_location_sp || !to_location_sp) |
| 228 | return; |
| 229 | |
| 230 | m_address_to_location.erase(to_location_sp->GetAddress()); |
| 231 | to_location_sp->SwapLocation(from_location_sp); |
| 232 | RemoveLocation(from_location_sp); |
| 233 | m_address_to_location[to_location_sp->GetAddress()] = to_location_sp; |
| 234 | to_location_sp->ResolveBreakpointSite(); |
| 235 | } |
| 236 | |
| 237 | bool BreakpointLocationList::RemoveLocation( |
| 238 | const lldb::BreakpointLocationSP &bp_loc_sp) { |
| 239 | if (bp_loc_sp) { |
Saleem Abdulrasool | 16ff860 | 2016-05-18 01:59:10 +0000 | [diff] [blame] | 240 | std::lock_guard<std::recursive_mutex> guard(m_mutex); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 241 | |
| 242 | m_address_to_location.erase(bp_loc_sp->GetAddress()); |
| 243 | |
Jim Ingham | 5ec7cd7 | 2018-01-12 03:03:23 +0000 | [diff] [blame] | 244 | size_t num_locations = m_locations.size(); |
| 245 | for (size_t idx = 0; idx < num_locations; idx++) { |
| 246 | if (m_locations[idx].get() == bp_loc_sp.get()) { |
| 247 | RemoveLocationByIndex(idx); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 248 | return true; |
| 249 | } |
Jim Ingham | d4ce0a1 | 2010-10-20 03:36:33 +0000 | [diff] [blame] | 250 | } |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 251 | } |
| 252 | return false; |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 253 | } |
| 254 | |
Jim Ingham | 5ec7cd7 | 2018-01-12 03:03:23 +0000 | [diff] [blame] | 255 | void BreakpointLocationList::RemoveLocationByIndex(size_t idx) { |
| 256 | assert (idx < m_locations.size()); |
| 257 | m_address_to_location.erase(m_locations[idx]->GetAddress()); |
| 258 | m_locations.erase(m_locations.begin() + idx); |
| 259 | } |
| 260 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 261 | void BreakpointLocationList::RemoveInvalidLocations(const ArchSpec &arch) { |
| 262 | std::lock_guard<std::recursive_mutex> guard(m_mutex); |
| 263 | size_t idx = 0; |
Adrian Prantl | 0509724 | 2018-04-30 16:49:04 +0000 | [diff] [blame] | 264 | // Don't cache m_location.size() as it will change since we might remove |
| 265 | // locations from our vector... |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 266 | while (idx < m_locations.size()) { |
| 267 | BreakpointLocation *bp_loc = m_locations[idx].get(); |
| 268 | if (bp_loc->GetAddress().SectionWasDeleted()) { |
| 269 | // Section was deleted which means this breakpoint comes from a module |
| 270 | // that is no longer valid, so we should remove it. |
Jim Ingham | 5ec7cd7 | 2018-01-12 03:03:23 +0000 | [diff] [blame] | 271 | RemoveLocationByIndex(idx); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 272 | continue; |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 273 | } |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 274 | if (arch.IsValid()) { |
| 275 | ModuleSP module_sp(bp_loc->GetAddress().GetModule()); |
| 276 | if (module_sp) { |
| 277 | if (!arch.IsCompatibleMatch(module_sp->GetArchitecture())) { |
| 278 | // The breakpoint was in a module whose architecture is no longer |
| 279 | // compatible with "arch", so we need to remove it |
Jim Ingham | 5ec7cd7 | 2018-01-12 03:03:23 +0000 | [diff] [blame] | 280 | RemoveLocationByIndex(idx); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 281 | continue; |
Greg Clayton | e72dfb3 | 2012-02-24 01:59:29 +0000 | [diff] [blame] | 282 | } |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 283 | } |
Eugene Zelenko | 16fd751 | 2015-10-30 18:50:12 +0000 | [diff] [blame] | 284 | } |
Adrian Prantl | 0509724 | 2018-04-30 16:49:04 +0000 | [diff] [blame] | 285 | // Only increment the index if we didn't remove the locations at index |
| 286 | // "idx" |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 287 | ++idx; |
| 288 | } |
Greg Clayton | e72dfb3 | 2012-02-24 01:59:29 +0000 | [diff] [blame] | 289 | } |
| 290 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 291 | void BreakpointLocationList::StartRecordingNewLocations( |
| 292 | BreakpointLocationCollection &new_locations) { |
| 293 | std::lock_guard<std::recursive_mutex> guard(m_mutex); |
| 294 | assert(m_new_location_recorder == nullptr); |
| 295 | m_new_location_recorder = &new_locations; |
Greg Clayton | b35db63 | 2013-11-09 00:03:31 +0000 | [diff] [blame] | 296 | } |
Jim Ingham | e6bc6cb | 2012-02-08 05:23:15 +0000 | [diff] [blame] | 297 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 298 | void BreakpointLocationList::StopRecordingNewLocations() { |
| 299 | std::lock_guard<std::recursive_mutex> guard(m_mutex); |
| 300 | m_new_location_recorder = nullptr; |
Jim Ingham | e6bc6cb | 2012-02-08 05:23:15 +0000 | [diff] [blame] | 301 | } |
| 302 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 303 | void BreakpointLocationList::Compact() { |
| 304 | lldb::break_id_t highest_id = 0; |
Jim Ingham | e6bc6cb | 2012-02-08 05:23:15 +0000 | [diff] [blame] | 305 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 306 | for (BreakpointLocationSP loc_sp : m_locations) { |
| 307 | lldb::break_id_t cur_id = loc_sp->GetID(); |
| 308 | if (cur_id > highest_id) |
| 309 | highest_id = cur_id; |
| 310 | } |
| 311 | m_next_id = highest_id; |
Jim Ingham | 77fd738 | 2014-09-10 21:40:47 +0000 | [diff] [blame] | 312 | } |