Fix gdbserver_reconnect_p handling
authorPedro Alves <palves@redhat.com>
Thu, 16 Apr 2015 13:26:59 +0000 (14:26 +0100)
committerPedro Alves <palves@redhat.com>
Thu, 16 Apr 2015 13:26:59 +0000 (14:26 +0100)
commit1ca99c4299f4deed8765fbb1eb4f9aea40d919b6
tree45d6fada01823ad1b70d0f1599ba80a242f0882c
parent8550d3b32f4ac17bdb9e4768bb905da181b77ded
Fix gdbserver_reconnect_p handling

Commit 6423214f (testsuite: Don't use expect_background to reap
gdbserver) broke a couple tests that set gdbserver_reconnect_p and
restart gdb before reconnecting, because a gdb_exit (e.g., through
clean_restart) exits gdbserver unconditionally.

Fixes, with --target_board=native-gdbserver:

 -FAIL: gdb.trace/mi-tracepoint-changed.exp: reconnect: break-info 1
 +PASS: gdb.trace/mi-tracepoint-changed.exp: reconnect: tracepoint created
 +PASS: gdb.trace/mi-tracepoint-changed.exp: reconnect: tracepoint on marker is installed
 +PASS: gdb.trace/mi-tracepoint-changed.exp: reconnect: break-info 1

 -FAIL: gdb.trace/mi-tsv-changed.exp: upload: tsv1 created
 -FAIL: gdb.trace/mi-tsv-changed.exp: upload: tsv2 created
 +PASS: gdb.trace/mi-tsv-changed.exp: upload: tsv1 created
 +PASS: gdb.trace/mi-tsv-changed.exp: upload: tsv2 created

gdb/testsuite/
2015-04-16  Pedro Alves  <palves@redhat.com>

* lib/gdbserver-support.exp (gdb_exit): If gdbserver_reconnect_p
is set, don't exit gdbserver.
gdb/testsuite/ChangeLog
gdb/testsuite/lib/gdbserver-support.exp