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

Method SuspendThread

core/debuggerstate.cpp:234–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

232
233
234bool DebuggerThreads::SuspendThread(std::uint32_t tid)
235{
236 if (!m_state)
237 return false;
238
239 DebugAdapter* adapter = m_state->GetAdapter();
240 if (!adapter)
241 return false;
242
243 auto thread = std::find_if(m_threads.begin(), m_threads.end(), [&](DebugThread const& t) {
244 return t.m_tid == tid;
245 });
246
247 if (thread == m_threads.end())
248 return false;
249
250
251 if (thread->m_isFrozen)
252 return true;
253
254 auto result = adapter->SuspendThread(tid);
255 if (!result)
256 return false;
257
258 thread->m_isFrozen = true;
259
260 return true;
261}
262
263bool DebuggerThreads::ResumeThread(std::uint32_t tid)
264{

Callers 4

BNDebuggerSuspendThreadFunction · 0.45
makeItSoloThreadMethod · 0.45
suspendThreadMethod · 0.45
onDoubleClickedMethod · 0.45

Calls 1

GetAdapterMethod · 0.45

Tested by

no test coverage detected