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

Method ExecuteWithArgs

core/adapters/dbgengadapter.cpp:327–344  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

325
326
327bool DbgEngAdapter::ExecuteWithArgs(const std::string& path, const std::string& args, const std::string& workingDir,
328 const LaunchConfigurations& configs)
329{
330 std::atomic_bool ret = false;
331 std::atomic_bool finished = false;
332 // Doing the operation on a different thread ensures the same thread starts the session and runs EngineLoop().
333 // This is required by DngEng. Although things sometimes work even if it is violated, it can fail randomly.
334 std::thread([=, &ret, &finished]() {
335 ret = ExecuteWithArgsInternal(path, args, workingDir, configs);
336 finished = true;
337 if (ret)
338 EngineLoop();
339 }).detach();
340
341 while (!finished)
342 {}
343 return ret;
344}
345
346
347bool DbgEngAdapter::ExecuteWithArgsInternal(const std::string& path, const std::string& args,

Callers 1

ExecuteMethod · 0.95

Calls 1

detachMethod · 0.80

Tested by

no test coverage detected