summaryrefslogtreecommitdiff
path: root/src/plugins/debugger/stackframe.cpp
diff options
context:
space:
mode:
authorMarcus Tillmanns <marcus.tillmanns@qt.io>2022-12-01 07:59:35 +0100
committerMarcus Tillmanns <marcus.tillmanns@qt.io>2022-12-16 12:27:49 +0000
commit0aeec80eeb16f9412647124c2ebe3c4499fb0684 (patch)
tree494c4ac8e634082e7b031a4233c517650bfab45d /src/plugins/debugger/stackframe.cpp
parent2ffa843d404f47693325b7da0f887722f1f114dd (diff)
downloadqt-creator-0aeec80eeb16f9412647124c2ebe3c4499fb0684.tar.gz
Docker: Add Filepath::localSource()
FilePath::localSource can return a filepath that represents a local version of a remote file. It is used to let the debugger select the local version of a file when debugging a remote target. Change-Id: Ieb934ef0d454e8ff55e71df41dca825974d85da7 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/debugger/stackframe.cpp')
-rw-r--r--src/plugins/debugger/stackframe.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/debugger/stackframe.cpp b/src/plugins/debugger/stackframe.cpp
index 1a68e4ae3a..740868889e 100644
--- a/src/plugins/debugger/stackframe.cpp
+++ b/src/plugins/debugger/stackframe.cpp
@@ -74,7 +74,8 @@ StackFrame StackFrame::parseFrame(const GdbMi &frameMi, const DebuggerRunParamet
frame.function = frameMi["function"].data();
frame.module = frameMi["module"].data();
const FilePath debugger = rp.debugger.command.executable();
- frame.file = FilePath::fromString(frameMi["file"].data()).onDevice(debugger);
+ const FilePath onDevicePath = FilePath::fromString(frameMi["file"].data()).onDevice(debugger);
+ frame.file = onDevicePath.localSource().value_or(onDevicePath);
frame.line = frameMi["line"].toInt();
frame.address = frameMi["address"].toAddress();
frame.context = frameMi["context"].data();