forked from qt-creator/qt-creator
Debugger: Fix several uses of remote paths
... when passing into gdb. Change-Id: I8de8386fb1d398783dfa00ed883b1e44f0b2594a Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -3947,10 +3947,10 @@ void GdbEngine::handleGdbStarted()
|
||||
}
|
||||
|
||||
if (!rp.sysRoot.isEmpty()) {
|
||||
runCommand({"set sysroot " + rp.sysRoot.toString()});
|
||||
runCommand({"set sysroot " + rp.sysRoot.path()});
|
||||
// sysroot is not enough to correctly locate the sources, so explicitly
|
||||
// relocate the most likely place for the debug source
|
||||
runCommand({"set substitute-path /usr/src " + rp.sysRoot.toString() + "/usr/src"});
|
||||
runCommand({"set substitute-path /usr/src " + rp.sysRoot.path() + "/usr/src"});
|
||||
}
|
||||
|
||||
//QByteArray ba = QFileInfo(sp.dumperLibrary).path().toLocal8Bit();
|
||||
@@ -4145,7 +4145,7 @@ void GdbEngine::handleDebugInfoLocation(const DebuggerResponse &response)
|
||||
const FilePath debugInfoLocation = runParameters().debugInfoLocation;
|
||||
if (!debugInfoLocation.isEmpty() && debugInfoLocation.exists()) {
|
||||
const QString curDebugInfoLocations = response.consoleStreamOutput.split('"').value(1);
|
||||
QString cmd = "set debug-file-directory " + debugInfoLocation.toString();
|
||||
QString cmd = "set debug-file-directory " + debugInfoLocation.path();
|
||||
if (!curDebugInfoLocations.isEmpty())
|
||||
cmd += HostOsInfo::pathListSeparator() + curDebugInfoLocations;
|
||||
runCommand({cmd});
|
||||
@@ -4805,7 +4805,7 @@ void GdbEngine::handleTargetExtendedRemote(const DebuggerResponse &response)
|
||||
runCommand({"attach " + QString::number(runParameters().attachPID.pid()),
|
||||
CB(handleTargetExtendedAttach)});
|
||||
} else if (!runParameters().inferior.command.isEmpty()) {
|
||||
runCommand({"-gdb-set remote exec-file " + runParameters().inferior.command.executable().toString(),
|
||||
runCommand({"-gdb-set remote exec-file " + runParameters().inferior.command.executable().path(),
|
||||
CB(handleTargetExtendedAttach)});
|
||||
} else {
|
||||
const QString title = Tr::tr("No Remote Executable or Process ID Specified");
|
||||
@@ -4855,7 +4855,7 @@ void GdbEngine::handleTargetQnx(const DebuggerResponse &response)
|
||||
if (rp.attachPID.isValid())
|
||||
runCommand({"attach " + QString::number(rp.attachPID.pid()), CB(handleRemoteAttach)});
|
||||
else if (!rp.inferior.command.isEmpty())
|
||||
runCommand({"set nto-executable " + rp.inferior.command.executable().toString(),
|
||||
runCommand({"set nto-executable " + rp.inferior.command.executable().path(),
|
||||
CB(handleSetNtoExecutable)});
|
||||
else
|
||||
handleInferiorPrepared();
|
||||
|
Reference in New Issue
Block a user