Fix BreakpointLocationCollection::ShouldStop to handle breakpoint removal
Differential revision: http://reviews.llvm.org/D9886 llvm-svn: 238308
This commit is contained in:
parent
3afb2527ce
commit
729dcfb7ee
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue