void CMLink::SetBreakpoint ( const CMLocation& loc, const JBoolean temporary ) { SetBreakpoint(loc.GetFileName(), loc.GetLineNumber(), temporary); }
JBoolean CMBreakpointManager::HasBreakpointAt ( const CMLocation& loc ) const { CMBreakpoint target(loc.GetFileName(), loc.GetLineNumber()); JIndex i; return itsBPList->SearchSorted(&target, JOrderedSetT::kAnyMatch, &i); }
JBoolean CMBreakpointManager::GetBreakpoints ( const CMLocation& loc, JPtrArray<CMBreakpoint>* list ) const { list->RemoveAll(); list->SetCleanUpAction(JPtrArrayT::kForgetAll); if ((loc.GetFileID()).IsValid()) { CMBreakpoint target(loc.GetFileName(), loc.GetLineNumber()); JBoolean found; const JIndex startIndex = itsBPList->SearchSorted1(&target, JOrderedSetT::kFirstMatch, &found); const JSize count = itsBPList->GetElementCount(); for (JIndex i=startIndex; i<=count; i++) { CMBreakpoint* bp = itsBPList->NthElement(i); if (bp->GetLocation() == loc) { list->Append(bp); } else { break; } } } else if (!loc.GetFunctionName().IsEmpty()) { const JSize count = itsBPList->GetElementCount(); for (JIndex i=1; i<=count; i++) { CMBreakpoint* bp = itsBPList->NthElement(i); if (bp->GetFunctionName() == loc.GetFunctionName()) { list->Append(bp); } } } return !list->IsEmpty(); }