Commit 345eb5b0 authored by Fawzi Mohamed's avatar Fawzi Mohamed Committed by hjk
Browse files

lldb/ios: add platform specification



Change-Id: Ie7867dce5bd50573d714d41bf46195a802eb61c7
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent 262e3ab9
......@@ -633,9 +633,12 @@ class Dumper(DumperBase):
self.attachPid_ = args.get('attachPid', 0)
self.sysRoot_ = args.get('sysRoot', '')
self.remoteChannel_ = args.get('remoteChannel', '')
self.platform_ = args.get('platform', '')
if len(self.sysRoot_)>0:
if self.sysRoot_:
self.debugger.SetCurrentPlatformSDKRoot(self.sysRoot_)
if self.platform_:
self.debugger.SetCurrentPlatform(self.platform_)
self.target = self.debugger.CreateTarget(self.executable_, None, None, True, error)
self.importDumpers()
......@@ -653,16 +656,18 @@ class Dumper(DumperBase):
if self.attachPid_ > 0:
attachInfo = lldb.SBAttachInfo(self.attachPid_)
self.process = self.target.Attach(attachInfo, error)
if not err.Success():
if not error.Success():
self.report('state="inferiorrunfailed"')
return
self.report('pid="%s"' % self.process.GetProcessID())
self.report('state="enginerunandinferiorstopok"')
elif len(self.remoteChannel_) > 0:
err = lldb.SBError()
self.process = self.target.ConnectRemote(
self.debugger.GetListener(),
self.remoteChannel_, None, error)
if not error.Success():
self.report('state="inferiorrunfailed"')
return
self.report('state="enginerunandinferiorstopok"')
else:
launchInfo = lldb.SBLaunchInfo(self.processArgs_.split(' '))
......
......@@ -87,6 +87,7 @@ public:
QString debuggerCommand;
ProjectExplorer::Abi toolChainAbi;
QString platform;
QString executable;
QString displayName; // Used in the Snapshots view.
QString startMessage; // First status message shown.
......
......@@ -185,7 +185,7 @@ void LldbEngine::setupInferior()
cmd.arg("remoteChannel", ((sp.startMode == AttachToRemoteProcess
|| sp.startMode == AttachToRemoteServer)
? sp.remoteChannel : QString()));
cmd.arg("platform", sp.platform);
runCommand(cmd);
requestUpdateWatchers();
}
......
......@@ -75,10 +75,13 @@ RunControl *IosDebugSupport::createDebugRunControl(IosRunConfiguration *runConfi
QmakeProject *project = static_cast<QmakeProject *>(target->project());
DebuggerStartParameters params;
if (device->type() == Core::Id(Ios::Constants::IOS_DEVICE_TYPE))
if (device->type() == Core::Id(Ios::Constants::IOS_DEVICE_TYPE)) {
params.startMode = AttachToRemoteProcess;
else
params.platform = QLatin1String("remote-ios");
} else {
params.startMode = AttachExternal;
params.platform = QLatin1String("ios-simulator");
}
params.displayName = runConfig->appName();
params.remoteSetupNeeded = true;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment