8sa1-binutils-gdb/gdb/testsuite/lib
Pedro Alves b167e53f05 Fix mi_gdb_exit with secondary MI channels
Tests that use a secondary MI channel (i.e., either tests that call
mi_gdb_start with separate-mi-tty, or all tests when
FORCE_SEPARATE_MI_TTY=1 is specified on the make check command line),
don't close GDB correctly.

E.g., if you run gdb.mi/mi-exec-run.exp in a loop:

  while true; do make check TESTS="gdb.mi/mi-exec-run.exp"; done

you can see more than one gdb running at the same time:

  $ ps -ef | grep -v grep | grep "gdb/gdb"
  pedro      40507       1  7 15:47 ?        00:00:00 /home/pedro/gdb/build/gdb/testsuite/../../gdb/gdb -nw -nx -data-directory /home/pedro/gdb/build/gdb/testsuite/../data-directory
  pedro      40562       1  0 15:47 ?        00:00:00 /home/pedro/gdb/build/gdb/testsuite/../../gdb/gdb -nw -nx -data-directory /home/pedro/gdb/build/gdb/testsuite/../data-directory
  pedro      40727       1  0 15:47 ?        00:00:00 /home/pedro/gdb/build/gdb/testsuite/../../gdb/gdb -nw -nx -data-directory /home/pedro/gdb/build/gdb/testsuite/../data-directory
  pedro      40786       1  0 15:47 ?        00:00:00 /home/pedro/gdb/build/gdb/testsuite/../../gdb/gdb -nw -nx -data-directory /home/pedro/gdb/build/gdb/testsuite/../data-directory

This commit fixes it.

gdb/testsuite/ChangeLog:

	* lib/mi-support.exp (mi_uncatched_gdb_exit) Switch to the main
	spawn_id before calling remote_close.  Close secondary MI channel.
2020-09-20 16:02:24 +01:00
..
ada.exp
append_gdb_boards_dir.exp
build-piece.exp
cache.exp
check-test-names.exp gdb/testsuite: Use 'array unset' instead of just 'unset' 2020-08-04 15:56:08 +01:00
cl_util.c
cl_util.h
compile-support.exp
compiler.c
compiler.cc
completion-support.exp
cp-support.exp
d-support.exp
data-structures.exp
dtrace.exp
dwarf.exp [gdb/symtab] Ignore DW_LNE_lo_user/DW_LNE_hi_user range 2020-08-03 16:59:20 +02:00
fortran.exp Allow Flang kind printing in complex.exp,pointer-to-pointer.exp,vla-ptr-info.exp 2020-09-03 22:05:18 +05:30
future.exp [gdb/testsuite] Handle early_flags in gdb_default_target_compile 2020-06-30 09:23:09 +02:00
gdb-guile.exp
gdb-python.exp
gdb-utils.exp
gdb.exp [gdb/testsuite] Catch condition evaluation errors in gdb_assert 2020-09-16 13:27:32 +02:00
gdbserver-support.exp [gdb/testsuite] Detect gdb prompt after monitor exit 2020-09-16 14:53:26 +02:00
gen-perf-test.exp
gnat_debug_info_test.adb
go.exp
jit-elf-helpers.exp
memory.exp
mi-support.exp Fix mi_gdb_exit with secondary MI channels 2020-09-20 16:02:24 +01:00
objc.exp
opencl_hostapp.c
opencl_kernel.cl
opencl.exp
pascal.exp
pdtrace.in
perftest.exp
prelink-support.exp
prompt.exp
range-stepping-support.exp
read1.c
rust-support.exp Avoid running one Rust test against older LLVM 2020-09-15 09:27:01 -06:00
selftest-support.exp [gdb/testsuite] Fix captured_command_loop breakpoint in selftests 2020-07-29 18:16:26 +02:00
set_unbuffered_mode.c
sym-info-cmds.exp [gdb/testsuite] Fix gdb.fortran/info-modules.exp with gcc-4.8 2020-07-30 17:47:37 +02:00
trace-support.exp
tuiterm.exp
unbuffer_output.c
valgrind.exp [gdb/testsuite] Add gdb.base/valgrind-infcall-2.exp 2020-07-17 17:33:18 +02:00