Commit 64f715be authored by Elias Naur's avatar Elias Naur

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 <elias.naur@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 8b9ecbf3
...@@ -682,12 +682,14 @@ while True: ...@@ -682,12 +682,14 @@ while True:
break break
sys.stderr.write(out) sys.stderr.write(out)
state = process.GetStateFromEvent(event) 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 break
elif state == lldb.eStateConnected: elif state == lldb.eStateConnected:
process.RemoteLaunch(args, env, None, None, None, None, 0, False, err) process.RemoteLaunch(args, env, None, None, None, None, 0, False, err)
if not err.Success(): if not err.Success():
sys.stderr.write("lldb: failed to launch remote process: %s\n" % (err)) sys.stderr.write("lldb: failed to launch remote process: %s\n" % (err))
process.Kill()
debugger.Terminate()
sys.exit(1) sys.exit(1)
# Process stops once at the beginning. Continue. # Process stops once at the beginning. Continue.
process.Continue() process.Continue()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment