Vulkan/Debug: Fix `DAP_LOG` macro

Variadic arguments weren't using the ## prefix, and causing build failures on certain compilers.

Also always `printf()` the "Waiting for debugger connection..." message. If we're debugging, then writing to `stdout` isn't an offence.

Bug: b/145351270
Change-Id: I2f86b118043ef2b2b6d291834c9f134a4db5c18d
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/40091
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Ben Clayton <bclayton@google.com>
diff --git a/src/Vulkan/Debug/Server.cpp b/src/Vulkan/Debug/Server.cpp
index f004fa8..d6e17b6 100644
--- a/src/Vulkan/Debug/Server.cpp
+++ b/src/Vulkan/Debug/Server.cpp
@@ -32,7 +32,7 @@
 #define ENABLE_DAP_LOGGING 0
 
 #if ENABLE_DAP_LOGGING
-#	define DAP_LOG(msg, ...) printf(msg "\n", __VA_ARGS__)
+#	define DAP_LOG(msg, ...) printf(msg "\n", ##__VA_ARGS__)
 #else
 #	define DAP_LOG(...) \
 		do               \
@@ -104,6 +104,7 @@
 		    dap::SetFunctionBreakpointsResponse response;
 		    for(auto const &bp : req.breakpoints)
 		    {
+			    DAP_LOG("Setting breakpoint for function '%s'", bp.name.c_str());
 			    lock.addFunctionBreakpoint(bp.name.c_str());
 			    response.breakpoints.push_back({});
 		    }
@@ -467,12 +468,13 @@
 		return dap::ConfigurationDoneResponse();
 	});
 
-	DAP_LOG("Waiting for debugger connection...");
+	printf("Waiting for debugger connection...\n");
 	server->start(port, [&](const std::shared_ptr<dap::ReaderWriter> &rw) {
 		session->bind(rw);
 		ctx->addListener(this);
 	});
 	configurationDone.wait();
+	printf("Debugger connection established\n");
 }
 
 Server::Impl::~Impl()