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:
Eike Ziller
2020-07-03 18:00:34 +02:00
parent dd505ef413
commit d0e3f5ca98

View File

@@ -890,8 +890,8 @@ 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)
@@ -900,7 +900,6 @@ class Dumper(DumperBase):
self.target.GetPlatform().GetName(),
self.target.GetPlatform().IsConnected()))
broadcaster = self.target.GetBroadcaster()
listener = self.debugger.GetListener()
broadcaster.AddListener(listener, lldb.SBProcess.eBroadcastBitStateChanged)
@@ -947,6 +946,12 @@ class Dumper(DumperBase):
elif (self.startMode_ == DebuggerStartMode.AttachToRemoteServer
or self.startMode_ == DebuggerStartMode.AttachToRemoteProcess):
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_)