From: Elias Naur Date: Thu, 3 May 2018 07:48:32 +0000 (+0200) Subject: misc/ios: clean up debugger instance on failure X-Git-Tag: go1.11beta1~559 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=64f715beb6551f91c271a47b6c2c62dedf27fadf;p=gostls13.git misc/ios: clean up debugger instance on failure Also replace repeated `or` clauses with the Python idiomatic list operator `in`. Change-Id: I4b178f93eb92996d8b5449ee5d252543624aed9e Reviewed-on: https://go-review.googlesource.com/111215 Run-TryBot: Elias Naur TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- diff --git a/misc/ios/go_darwin_arm_exec.go b/misc/ios/go_darwin_arm_exec.go index 8e0526867d..675b8d26fa 100644 --- a/misc/ios/go_darwin_arm_exec.go +++ b/misc/ios/go_darwin_arm_exec.go @@ -682,12 +682,14 @@ while True: break sys.stderr.write(out) state = process.GetStateFromEvent(event) - if state == lldb.eStateCrashed or state == lldb.eStateDetached or state == lldb.eStateUnloaded or state == lldb.eStateExited: + if state in [lldb.eStateCrashed, lldb.eStateDetached, lldb.eStateUnloaded, lldb.eStateExited]: break elif state == lldb.eStateConnected: process.RemoteLaunch(args, env, None, None, None, None, 0, False, err) if not err.Success(): sys.stderr.write("lldb: failed to launch remote process: %s\n" % (err)) + process.Kill() + debugger.Terminate() sys.exit(1) # Process stops once at the beginning. Continue. process.Continue()