forked from qt-creator/qt-creator
Debugger: Transform DebuggerRunParameters::platform
Merge setIosPlatform() into setLldbPlatform(). Task-number: QTCREATORBUG-29168 Change-Id: Ib29e291921fd0b64076df6ddbe2aaa1ffa3adc07 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -86,13 +86,13 @@ public:
|
|||||||
explicit AndroidDebugSupport(RunControl *runControl) : Debugger::DebuggerRunTool(runControl)
|
explicit AndroidDebugSupport(RunControl *runControl) : Debugger::DebuggerRunTool(runControl)
|
||||||
{
|
{
|
||||||
setId("AndroidDebugger");
|
setId("AndroidDebugger");
|
||||||
setLldbPlatform("remote-android");
|
DebuggerRunParameters &rp = runParameters();
|
||||||
|
rp.setLldbPlatform("remote-android");
|
||||||
m_runner = new AndroidRunner(runControl);
|
m_runner = new AndroidRunner(runControl);
|
||||||
addStartDependency(m_runner);
|
addStartDependency(m_runner);
|
||||||
|
|
||||||
Target *target = runControl->target();
|
Target *target = runControl->target();
|
||||||
Kit *kit = target->kit();
|
Kit *kit = target->kit();
|
||||||
DebuggerRunParameters &rp = runParameters();
|
|
||||||
rp.setStartMode(AttachToRemoteServer);
|
rp.setStartMode(AttachToRemoteServer);
|
||||||
const QString packageName = Internal::packageName(target);
|
const QString packageName = Internal::packageName(target);
|
||||||
rp.setDisplayName(packageName);
|
rp.setDisplayName(packageName);
|
||||||
|
@@ -150,8 +150,9 @@ public:
|
|||||||
void addSearchDirectory(const Utils::FilePath &dir) { m_additionalSearchDirectories.append(dir); }
|
void addSearchDirectory(const Utils::FilePath &dir) { m_additionalSearchDirectories.append(dir); }
|
||||||
Utils::FilePaths additionalSearchDirectories() const { return m_additionalSearchDirectories; }
|
Utils::FilePaths additionalSearchDirectories() const { return m_additionalSearchDirectories; }
|
||||||
|
|
||||||
// Used by iOS.
|
void setLldbPlatform(const QString &platform) { m_lldbPlatform = platform; }
|
||||||
QString platform;
|
QString lldbPlatform() const { return m_lldbPlatform; }
|
||||||
|
|
||||||
QString deviceSymbolsRoot;
|
QString deviceSymbolsRoot;
|
||||||
bool continueAfterAttach = false;
|
bool continueAfterAttach = false;
|
||||||
Utils::FilePath sysRoot;
|
Utils::FilePath sysRoot;
|
||||||
@@ -253,6 +254,8 @@ private:
|
|||||||
bool m_useTargetAsync = false;
|
bool m_useTargetAsync = false;
|
||||||
|
|
||||||
Utils::FilePaths m_additionalSearchDirectories;
|
Utils::FilePaths m_additionalSearchDirectories;
|
||||||
|
|
||||||
|
QString m_lldbPlatform;
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
@@ -108,11 +108,6 @@ void DebuggerRunTool::setSysRoot(const Utils::FilePath &sysRoot)
|
|||||||
m_runParameters.sysRoot = sysRoot;
|
m_runParameters.sysRoot = sysRoot;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebuggerRunTool::setLldbPlatform(const QString &platform)
|
|
||||||
{
|
|
||||||
m_runParameters.platform = platform;
|
|
||||||
}
|
|
||||||
|
|
||||||
void DebuggerRunTool::setContinueAfterAttach(bool on)
|
void DebuggerRunTool::setContinueAfterAttach(bool on)
|
||||||
{
|
{
|
||||||
m_runParameters.continueAfterAttach = on;
|
m_runParameters.continueAfterAttach = on;
|
||||||
@@ -133,11 +128,6 @@ void DebuggerRunTool::setDebugInfoLocation(const FilePath &debugInfoLocation)
|
|||||||
m_runParameters.debugInfoLocation = debugInfoLocation;
|
m_runParameters.debugInfoLocation = debugInfoLocation;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebuggerRunTool::setIosPlatform(const QString &platform)
|
|
||||||
{
|
|
||||||
m_runParameters.platform = platform;
|
|
||||||
}
|
|
||||||
|
|
||||||
void DebuggerRunTool::setDeviceSymbolsRoot(const QString &deviceSymbolsRoot)
|
void DebuggerRunTool::setDeviceSymbolsRoot(const QString &deviceSymbolsRoot)
|
||||||
{
|
{
|
||||||
m_runParameters.deviceSymbolsRoot = deviceSymbolsRoot;
|
m_runParameters.deviceSymbolsRoot = deviceSymbolsRoot;
|
||||||
|
@@ -52,7 +52,6 @@ public:
|
|||||||
|
|
||||||
DebuggerRunParameters &runParameters() { return m_runParameters; }
|
DebuggerRunParameters &runParameters() { return m_runParameters; }
|
||||||
|
|
||||||
void setLldbPlatform(const QString &platform);
|
|
||||||
void addQmlServerInferiorCommandLineArgumentIfNeeded();
|
void addQmlServerInferiorCommandLineArgumentIfNeeded();
|
||||||
void setupPortsGatherer();
|
void setupPortsGatherer();
|
||||||
|
|
||||||
@@ -63,7 +62,6 @@ public:
|
|||||||
|
|
||||||
void modifyDebuggerEnvironment(const Utils::EnvironmentItems &item);
|
void modifyDebuggerEnvironment(const Utils::EnvironmentItems &item);
|
||||||
|
|
||||||
void setIosPlatform(const QString &platform);
|
|
||||||
void setDeviceSymbolsRoot(const QString &deviceSymbolsRoot);
|
void setDeviceSymbolsRoot(const QString &deviceSymbolsRoot);
|
||||||
void setDeviceUuid(const QString &uuid);
|
void setDeviceUuid(const QString &uuid);
|
||||||
|
|
||||||
|
@@ -286,7 +286,7 @@ void LldbEngine::handleLldbStarted()
|
|||||||
"processargs",
|
"processargs",
|
||||||
toHex(ProcessArgs::splitArgs(rp.inferior().command.arguments(), HostOsInfo::hostOs())
|
toHex(ProcessArgs::splitArgs(rp.inferior().command.arguments(), HostOsInfo::hostOs())
|
||||||
.join(QChar(0))));
|
.join(QChar(0))));
|
||||||
cmd2.arg("platform", rp.platform);
|
cmd2.arg("platform", rp.lldbPlatform());
|
||||||
cmd2.arg("symbolfile", rp.symbolFile().path());
|
cmd2.arg("symbolfile", rp.symbolFile().path());
|
||||||
|
|
||||||
if (usesTerminal()) {
|
if (usesTerminal()) {
|
||||||
|
@@ -930,7 +930,7 @@ IosDebugSupport::IosDebugSupport(RunControl *runControl)
|
|||||||
} else {
|
} else {
|
||||||
rp.setStartMode(AttachToRemoteProcess);
|
rp.setStartMode(AttachToRemoteProcess);
|
||||||
}
|
}
|
||||||
setIosPlatform("remote-ios");
|
rp.setLldbPlatform("remote-ios");
|
||||||
const expected_str<FilePath> deviceSdk = findDeviceSdk(dev);
|
const expected_str<FilePath> deviceSdk = findDeviceSdk(dev);
|
||||||
|
|
||||||
if (!deviceSdk)
|
if (!deviceSdk)
|
||||||
@@ -939,7 +939,7 @@ IosDebugSupport::IosDebugSupport(RunControl *runControl)
|
|||||||
setDeviceSymbolsRoot(deviceSdk->path());
|
setDeviceSymbolsRoot(deviceSdk->path());
|
||||||
} else {
|
} else {
|
||||||
rp.setStartMode(AttachToLocalProcess);
|
rp.setStartMode(AttachToLocalProcess);
|
||||||
setIosPlatform("ios-simulator");
|
rp.setLldbPlatform("ios-simulator");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -58,9 +58,9 @@ public:
|
|||||||
rp.setUseExtendedRemote(true);
|
rp.setUseExtendedRemote(true);
|
||||||
|
|
||||||
if (rc->device()->osType() == Utils::OsTypeMac)
|
if (rc->device()->osType() == Utils::OsTypeMac)
|
||||||
debugger->setLldbPlatform("remote-macosx");
|
rp.setLldbPlatform("remote-macosx");
|
||||||
else
|
else
|
||||||
debugger->setLldbPlatform("remote-linux");
|
rp.setLldbPlatform("remote-linux");
|
||||||
return debugger;
|
return debugger;
|
||||||
});
|
});
|
||||||
addSupportedRunMode(ProjectExplorer::Constants::DEBUG_RUN_MODE);
|
addSupportedRunMode(ProjectExplorer::Constants::DEBUG_RUN_MODE);
|
||||||
|
Reference in New Issue
Block a user