diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 98444776787..e401ca62599 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -4194,6 +4194,9 @@ void GdbEngine::setupInferior() // Do that first, otherwise no symbols are loaded. QFileInfo fi = executable.toFileInfo(); QString path = fi.absoluteFilePath(); + // 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 + '"', CB(handleFileExecAndSymbols)});