forked from qt-creator/qt-creator
Fix debugging C++ on iOS devices
Partially revert 7f958700a0
for 'remote-ios'.
The original commit changed the way attaching to a remote server or process
works, attempting to make it work with lldb-server on a remote linux device.
That breaks connecting to the debugging server on iOS devices.
Fixes: QTCREATORBUG-23995
Change-Id: I7a793fa73a564a4ef19cf82e13c2ad50d4247ee3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -890,16 +890,15 @@ class Dumper(DumperBase):
|
||||
|
||||
if (self.startMode_ == DebuggerStartMode.AttachToRemoteServer
|
||||
or self.startMode_ == DebuggerStartMode.AttachToRemoteProcess):
|
||||
if self.platform_ != 'remote-ios':
|
||||
# lldb-server expected on remote
|
||||
remote_channel = 'connect://' + self.remoteChannel_
|
||||
connect_options = lldb.SBPlatformConnectOptions(remote_channel)
|
||||
|
||||
|
||||
remote_channel = 'connect://' + self.remoteChannel_
|
||||
connect_options = lldb.SBPlatformConnectOptions(remote_channel)
|
||||
|
||||
res = self.target.GetPlatform().ConnectRemote(connect_options)
|
||||
DumperBase.warn("CONNECT: %s %s %s" % (res,
|
||||
self.target.GetPlatform().GetName(),
|
||||
self.target.GetPlatform().IsConnected()))
|
||||
|
||||
res = self.target.GetPlatform().ConnectRemote(connect_options)
|
||||
DumperBase.warn("CONNECT: %s %s %s" % (res,
|
||||
self.target.GetPlatform().GetName(),
|
||||
self.target.GetPlatform().IsConnected()))
|
||||
|
||||
broadcaster = self.target.GetBroadcaster()
|
||||
listener = self.debugger.GetListener()
|
||||
@@ -947,17 +946,23 @@ class Dumper(DumperBase):
|
||||
elif (self.startMode_ == DebuggerStartMode.AttachToRemoteServer
|
||||
or self.startMode_ == DebuggerStartMode.AttachToRemoteProcess):
|
||||
|
||||
f = lldb.SBFileSpec()
|
||||
f.SetFilename(self.executable_)
|
||||
if self.platform_ == 'remote-ios':
|
||||
self.process = self.target.ConnectRemote(
|
||||
self.debugger.GetListener(),
|
||||
self.remoteChannel_, None, error)
|
||||
else:
|
||||
# lldb-server expected
|
||||
f = lldb.SBFileSpec()
|
||||
f.SetFilename(self.executable_)
|
||||
|
||||
launchInfo = lldb.SBLaunchInfo(self.processArgs_)
|
||||
#launchInfo.SetWorkingDirectory(self.workingDirectory_)
|
||||
launchInfo.SetWorkingDirectory('/tmp')
|
||||
launchInfo.SetExecutableFile(f, True)
|
||||
launchInfo = lldb.SBLaunchInfo(self.processArgs_)
|
||||
#launchInfo.SetWorkingDirectory(self.workingDirectory_)
|
||||
launchInfo.SetWorkingDirectory('/tmp')
|
||||
launchInfo.SetExecutableFile(f, True)
|
||||
|
||||
DumperBase.warn("TARGET: %s" % self.target)
|
||||
self.process = self.target.Launch(launchInfo, error)
|
||||
DumperBase.warn("PROCESS: %s" % self.process)
|
||||
DumperBase.warn("TARGET: %s" % self.target)
|
||||
self.process = self.target.Launch(launchInfo, error)
|
||||
DumperBase.warn("PROCESS: %s" % self.process)
|
||||
|
||||
if not error.Success():
|
||||
self.report(self.describeError(error))
|
||||
|
Reference in New Issue
Block a user