diff --git a/share/qtcreator/debugger/lldbbridge.py b/share/qtcreator/debugger/lldbbridge.py index 4863a0b3f58..57275c1e9a9 100644 --- a/share/qtcreator/debugger/lldbbridge.py +++ b/share/qtcreator/debugger/lldbbridge.py @@ -986,17 +986,25 @@ class Dumper(DumperBase): and self.platform_ == 'remote-android'): connect_options = lldb.SBPlatformConnectOptions(self.remoteChannel_) - res = self.target.GetPlatform().ConnectRemote(connect_options) + target_platform = self.target.GetPlatform() + + res = target_platform.ConnectRemote(connect_options) + + is_connected = target_platform.IsConnected() + + DumperBase.warn("CONNECT: %s %s target platform: %s connected: %s" + % (res, self.remoteChannel_, target_platform.GetName(), is_connected)) - DumperBase.warn("CONNECT: %s %s platform: %s connected: %s" % (res, - self.remoteChannel_, - self.target.GetPlatform().GetName(), - self.target.GetPlatform().IsConnected())) if not res.Success(): self.report(self.describeError(res)) self.reportState('enginerunfailed') return + if not is_connected: + self.report('Could not connect to debug server') + self.reportState('enginerunfailed') + return + attach_info = lldb.SBAttachInfo(self.attachPid_) self.process = self.target.Attach(attach_info, error) if not error.Success():