From 144dff8d744c5456cac4386dfe10bd87690d0ad2 Mon Sep 17 00:00:00 2001 From: Marcus Tillmanns Date: Thu, 2 Feb 2023 14:25:48 +0100 Subject: [PATCH] Gdb: Use path() of executable Change-Id: I872da3995344b6337b5d72925768034b58f9b339 Reviewed-by: hjk --- src/plugins/debugger/gdb/gdbengine.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 933e923d625..9797a354bba 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -4439,12 +4439,11 @@ void GdbEngine::setupInferior() } // Do that first, otherwise no symbols are loaded. - QFileInfo fi = executable.toFileInfo(); - QString path = fi.absoluteFilePath(); + const QString localExecutablePath = executable.absoluteFilePath().path(); // This is *not* equivalent to -file-exec-and-symbols. If the file is not executable // (contains only debugging symbols), this should still work. - runCommand({"-file-exec-file \"" + path + '"'}); - runCommand({"-file-symbol-file \"" + path + '"', + runCommand({"-file-exec-file \"" + localExecutablePath + '"'}); + runCommand({"-file-symbol-file \"" + localExecutablePath + '"', CB(handleFileExecAndSymbols)}); } else if (isTermEngine()) {