adb_gdb allows ctrl-c for interrupting the debuggee
Previously adb_gdb started the gdbserver in a backgrounded bash subprocess. As a result, it was receiving SIGINTs when you used ctrl-c to to interrupt the debuggee in gdb. Now it's started backgrounded, but not in a subshell, which means it will be set to ignore SIGINT. (This behavior is under the "SIGNALS" heading in the bash man page.) It will still get killed by the EXIT trap, so it doesn't leak. BUG= Review URL: https://codereview.chromium.org/1473303003 Cr-Original-Commit-Position: refs/heads/master@{#361713} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 458e26c62669faec41db97e60ae050dc60775e82
This commit is contained in:
Родитель
4e948ef7df
Коммит
b300d134d8
|
@ -983,9 +983,9 @@ host:localhost:$HOST_PORT to device:localhost:$TARGET_PORT!"
|
|||
log "Starting gdbserver in the background:"
|
||||
GDBSERVER_LOG=$TMPDIR/gdbserver-$TMP_ID.log
|
||||
log "adb shell $COMMAND_PREFIX $TARGET_GDBSERVER :$TARGET_PORT \
|
||||
--attach $PID $COMMAND_SUFFIX"
|
||||
("$ADB" shell $COMMAND_PREFIX $TARGET_GDBSERVER :$TARGET_PORT \
|
||||
--attach $PID $COMMAND_SUFFIX > $GDBSERVER_LOG 2>&1) &
|
||||
--attach $PID $COMMAND_SUFFIX"
|
||||
"$ADB" shell $COMMAND_PREFIX $TARGET_GDBSERVER :$TARGET_PORT \
|
||||
--attach $PID $COMMAND_SUFFIX > $GDBSERVER_LOG 2>&1 &
|
||||
GDBSERVER_PID=$!
|
||||
echo "$GDBSERVER_PID" > $GDBSERVER_PIDFILE
|
||||
log "background job pid: $GDBSERVER_PID"
|
||||
|
|
Загрузка…
Ссылка в новой задаче