diff --git a/src/plugins/baremetal/debugservers/gdb/gdbserverprovider.cpp b/src/plugins/baremetal/debugservers/gdb/gdbserverprovider.cpp index 885e20fac42..773a2ac577f 100644 --- a/src/plugins/baremetal/debugservers/gdb/gdbserverprovider.cpp +++ b/src/plugins/baremetal/debugservers/gdb/gdbserverprovider.cpp @@ -138,11 +138,8 @@ bool GdbServerProvider::isValid() const bool GdbServerProvider::aboutToRun(DebuggerRunTool *runTool, QString &errorMessage) const { QTC_ASSERT(runTool, return false); - const RunControl *runControl = runTool->runControl(); - const auto exeAspect = runControl->aspectData(); - QTC_ASSERT(exeAspect, return false); - - const FilePath bin = FilePath::fromString(exeAspect->executable.path()); + const ProcessRunData runnable = runTool->runControl()->runnable(); + const FilePath bin = FilePath::fromString(runnable.command.executable().path()); if (bin.isEmpty()) { errorMessage = Tr::tr("Cannot debug: Local executable is not set."); return false; @@ -155,8 +152,7 @@ bool GdbServerProvider::aboutToRun(DebuggerRunTool *runTool, QString &errorMessa ProcessRunData inferior; inferior.command.setExecutable(bin); - if (const auto argAspect = runControl->aspectData()) - inferior.command.setArguments(argAspect->arguments); + inferior.command.setArguments(runnable.command.arguments()); runTool->setInferior(inferior); runTool->setSymbolFile(bin); runTool->setStartMode(AttachToRemoteServer); diff --git a/src/plugins/baremetal/debugservers/uvsc/uvscserverprovider.cpp b/src/plugins/baremetal/debugservers/uvsc/uvscserverprovider.cpp index 3709736d842..4dac9b654c4 100644 --- a/src/plugins/baremetal/debugservers/uvsc/uvscserverprovider.cpp +++ b/src/plugins/baremetal/debugservers/uvsc/uvscserverprovider.cpp @@ -168,11 +168,7 @@ QString UvscServerProvider::channelString() const bool UvscServerProvider::aboutToRun(DebuggerRunTool *runTool, QString &errorMessage) const { QTC_ASSERT(runTool, return false); - const RunControl *runControl = runTool->runControl(); - const auto exeAspect = runControl->aspectData(); - QTC_ASSERT(exeAspect, return false); - - const FilePath bin = exeAspect->executable; + const FilePath bin = runTool->runControl()->runnable().command.executable(); if (bin.isEmpty()) { errorMessage = Tr::tr("Cannot debug: Local executable is not set."); return false;