diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 8786dbd543f..98444776787 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -4161,10 +4161,7 @@ void GdbEngine::setupInferior() if (symbolFile.isEmpty()) { showMessage(tr("No symbol file given."), StatusBar); callTargetRemote(); - return; - } - - if (!symbolFile.isEmpty()) { + } else { runCommand({"-file-exec-and-symbols \"" + symbolFile + '"', CB(handleFileExecAndSymbols)}); }