summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2020-07-03 18:00:34 +0200
committerEike Ziller <eike.ziller@qt.io>2020-07-06 09:18:40 +0000
commitd0e3f5ca98f3d7d3646c5ce57af39d38e92229de (patch)
tree380f3bacced2df2a7d3a422aaff839f8cab7b4da
parentdd505ef4131945d00b7c00a9c6f176e485b32b85 (diff)
downloadqt-creator-d0e3f5ca98f3d7d3646c5ce57af39d38e92229de.tar.gz
Fix debugging C++ on iOS devices
Partially revert 7f958700a09f09ac124b20d23236ede472b58d87 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>
-rw-r--r--share/qtcreator/debugger/lldbbridge.py45
1 files changed, 25 insertions, 20 deletions
diff --git a/share/qtcreator/debugger/lldbbridge.py b/share/qtcreator/debugger/lldbbridge.py
index e3d9196345..3350318fbd 100644
--- a/share/qtcreator/debugger/lldbbridge.py
+++ b/share/qtcreator/debugger/lldbbridge.py
@@ -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_)
-
- 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)
+ 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)
+
+ 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))