DAP: Fix launch of an application without run parameters

Now dap gdb debugger takes into account "Command line arguments:".

Change-Id: I5e7630a56a0851e7a0b8356129eb250bb29d5893
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Artem Sokolovskii
2023-09-29 15:46:20 +02:00
parent c6d1c962ee
commit 49b773bd25
4 changed files with 9 additions and 4 deletions

View File

@@ -58,10 +58,13 @@ void DapClient::sendInitialize()
postRequest("initialize", QJsonObject{{"clientID", "QtCreator"}, {"clientName", "QtCreator"}});
}
void DapClient::sendLaunch(const Utils::FilePath &executable)
void DapClient::sendLaunch(const Utils::CommandLine &command)
{
postRequest("launch",
QJsonObject{{"noDebug", false}, {"program", executable.path()}, {"__restart", ""}});
QJsonObject{{"noDebug", false},
{"program", command.executable().path()},
{"args", command.arguments()},
{"__restart", ""}});
}
void DapClient::sendAttach()