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

Method Attach

core/adapters/dbgengadapter.cpp:584–600  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

582}
583
584bool DbgEngAdapter::Attach(std::uint32_t pid)
585{
586 std::atomic_bool ret = false;
587 std::atomic_bool finished = false;
588 // Doing the operation on a different thread ensures the same thread starts the session and runs EngineLoop().
589 // This is required by DngEng. Although things sometimes work even if it is violated, it can fail randomly.
590 std::thread([=, &ret, &finished]() {
591 ret = AttachInternal(pid);
592 finished = true;
593 if (ret)
594 EngineLoop();
595 }).detach();
596
597 while (!finished)
598 {}
599 return ret;
600}
601
602bool DbgEngAdapter::Connect(const std::string& server, std::uint32_t port)
603{

Callers

nothing calls this directly

Calls 1

detachMethod · 0.80

Tested by

no test coverage detected