From 5e95aa85bb660d45e9905ef1d7180b2678280660 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Fri, 3 Jul 2015 16:57:06 +0000 Subject: Import LLDB as of upstream SVN 241361 (git 612c075f) --- source/Breakpoint/BreakpointLocationCollection.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'source/Breakpoint/BreakpointLocationCollection.cpp') diff --git a/source/Breakpoint/BreakpointLocationCollection.cpp b/source/Breakpoint/BreakpointLocationCollection.cpp index 5756ccedfaa4..5b6e746f911d 100644 --- a/source/Breakpoint/BreakpointLocationCollection.cpp +++ b/source/Breakpoint/BreakpointLocationCollection.cpp @@ -138,11 +138,17 @@ bool BreakpointLocationCollection::ShouldStop (StoppointCallbackContext *context) { bool shouldStop = false; - const size_t count = GetSize(); - for (size_t i = 0; i < count; i++) + size_t i = 0; + size_t prev_size = GetSize(); + while (i < prev_size) { + // ShouldStop can remove the breakpoint from the list if (GetByIndex(i)->ShouldStop(context)) shouldStop = true; + + if (prev_size == GetSize()) + i++; + prev_size = GetSize(); } return shouldStop; } -- cgit v1.3