Commit bb3aebf7 by Ben Clayton

Vulkan debugger: Don't wait for debugger by default.

Only wait when the `VK_WAIT_FOR_DEBUGGER` env var is set. Long term I want to move away from relying on environment variables, but this is currently consistent with the `VK_DEBUGGER_PORT` env var which also enables the debugger. Bug: b/148135662 Change-Id: I990d907d7570569e9d6716cf5d13e9846f4a5c02 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/40429Reviewed-by: 's avatarAntonio Maiorano <amaiorano@google.com> Tested-by: 's avatarBen Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
parent 9cc163cb
...@@ -468,13 +468,18 @@ Server::Impl::Impl(const std::shared_ptr<Context> &context, int port) ...@@ -468,13 +468,18 @@ Server::Impl::Impl(const std::shared_ptr<Context> &context, int port)
return dap::ConfigurationDoneResponse(); return dap::ConfigurationDoneResponse();
}); });
printf("Waiting for debugger connection...\n");
server->start(port, [&](const std::shared_ptr<dap::ReaderWriter> &rw) { server->start(port, [&](const std::shared_ptr<dap::ReaderWriter> &rw) {
session->bind(rw); session->bind(rw);
ctx->addListener(this); ctx->addListener(this);
}); });
configurationDone.wait();
printf("Debugger connection established\n"); static bool waitForDebugger = getenv("VK_WAIT_FOR_DEBUGGER") != nullptr;
if(waitForDebugger)
{
printf("Waiting for debugger connection...\n");
configurationDone.wait();
printf("Debugger connection established\n");
}
} }
Server::Impl::~Impl() Server::Impl::~Impl()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment