MCPcopy Create free account
hub / github.com/Vector35/debugger / makeItSoloThread

Method makeItSoloThread

ui/threadframes.cpp:387–413  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

385}
386
387void ThreadFramesWidget::makeItSoloThread()
388{
389 QModelIndexList sel = selectionModel()->selectedIndexes();
390 if (sel.empty())
391 return;
392
393 FrameItem* item = static_cast<FrameItem*>(sel[0].internalPointer());
394 if (!item)
395 return;
396
397 auto soloTid = item->tid();
398 auto isSoloFrozen = item->isFrozen();
399
400 auto threads = m_debugger->GetThreads();
401 for (const DebugThread& thread : threads)
402 {
403 if (thread.m_tid != soloTid && !thread.m_isFrozen)
404 m_debugger->SuspendThread(thread.m_tid);
405 }
406
407 // make sure solo thread is unfrozen and activated
408 if (isSoloFrozen)
409 m_debugger->ResumeThread(soloTid);
410
411 if (m_debugger->GetActiveThread().m_tid != soloTid)
412 m_debugger->SetActiveThread(soloTid);
413}
414
415void ThreadFramesWidget::updateFonts()
416{

Callers

nothing calls this directly

Calls 7

tidMethod · 0.80
isFrozenMethod · 0.80
GetThreadsMethod · 0.45
SuspendThreadMethod · 0.45
ResumeThreadMethod · 0.45
GetActiveThreadMethod · 0.45
SetActiveThreadMethod · 0.45

Tested by

no test coverage detected