From ac32cf56a1c73aa7178cf9081fbf1e3a47a6a438 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Thu, 7 Jan 2021 09:25:23 +0200 Subject: Debugger: Add -file-exec-file when opening a core dump -file-symbol-file alone doesn't cover all cases. Run -file-exec-file too. Task-number: QTCREATORBUG-24541 Change-Id: Id4d8f7057f845bce32b28cc8f4db0eadcfcfab28 Reviewed-by: hjk --- src/plugins/debugger/gdb/gdbengine.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/plugins/debugger') diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 9844477678..e401ca6259 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)}); -- cgit v1.2.1