Skip to content

Commit

Permalink
misc/ios: clean up debugger instance on failure
Browse files Browse the repository at this point in the history
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 <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
Reviewed-by: Brad Fitzpatrick <[email protected]>
  • Loading branch information
Elias Naur committed May 3, 2018
1 parent 8b9ecbf commit 64f715b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion misc/ios/go_darwin_arm_exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 64f715b

Please sign in to comment.