From 0aeec80eeb16f9412647124c2ebe3c4499fb0684 Mon Sep 17 00:00:00 2001 From: Marcus Tillmanns Date: Thu, 1 Dec 2022 07:59:35 +0100 Subject: 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: Reviewed-by: hjk --- src/plugins/debugger/gdb/gdbengine.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/plugins/debugger/gdb/gdbengine.cpp') diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 67e0dd72e5..b3327cac37 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -1165,7 +1165,9 @@ void GdbEngine::handleStopResponse(const GdbMi &data) showMessage("INVALID STOPPED REASON", LogWarning); } - const FilePath fileName = FilePath::fromString(fullName); + const FilePath onDevicePath = FilePath::fromString(fullName).onDevice( + runParameters().debugger.command.executable()); + const FilePath fileName = onDevicePath.localSource().value_or(onDevicePath); if (!nr.isEmpty() && frame.isValid()) { // Use opportunity to update the breakpoint marker position. -- cgit v1.2.1