Debugger: Use FilePath for debugInfoLocation

Change-Id: Id538ab4ddd1d634d0dc73a00fe42d3fd35341bea
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2021-09-27 11:11:18 +02:00
parent 9c97e03465
commit 4b5aeb9a74
5 changed files with 14 additions and 15 deletions

View File

@@ -4149,10 +4149,10 @@ void GdbEngine::handleInferiorPrepared()
void GdbEngine::handleDebugInfoLocation(const DebuggerResponse &response)
{
if (response.resultClass == ResultDone) {
const QString debugInfoLocation = runParameters().debugInfoLocation;
if (!debugInfoLocation.isEmpty() && QFile::exists(debugInfoLocation)) {
const FilePath debugInfoLocation = runParameters().debugInfoLocation;
if (!debugInfoLocation.isEmpty() && debugInfoLocation.exists()) {
const QString curDebugInfoLocations = response.consoleStreamOutput.split('"').value(1);
QString cmd = "set debug-file-directory " + debugInfoLocation;
QString cmd = "set debug-file-directory " + debugInfoLocation.toString();
if (!curDebugInfoLocations.isEmpty())
cmd += HostOsInfo::pathListSeparator() + curDebugInfoLocations;
runCommand({cmd});