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

Method GetActiveThread

core/adapters/lldbadapter.cpp:455–473  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

453
454
455DebugThread LldbAdapter::GetActiveThread() const
456{
457 SBThread thread = m_process.GetSelectedThread();
458 if (!thread.IsValid())
459 return DebugThread {};
460
461 auto tid = thread.GetThreadID();
462
463 uint64_t pc = 0;
464 size_t frameCount = thread.GetNumFrames();
465 if (frameCount > 0)
466 {
467 SBFrame frame = thread.GetFrameAtIndex(0);
468 if (frame.IsValid())
469 pc = frame.GetPC();
470 }
471
472 return DebugThread(tid, pc);
473}
474
475
476uint32_t LldbAdapter::GetActiveThreadId() const

Callers

nothing calls this directly

Calls 1

DebugThreadClass · 0.50

Tested by

no test coverage detected