Add multi-target tests
authorPedro Alves <palves@redhat.com>
Fri, 10 Jan 2020 20:06:09 +0000 (20:06 +0000)
committerPedro Alves <palves@redhat.com>
Fri, 10 Jan 2020 20:06:09 +0000 (20:06 +0000)
commit1dadb1dd718f93801bcca669a0fb38e3da6177b8
tree7b196aa81d9c1b3c57e639606948ff99f83d0f2f
parent5b6d1e4fa4fc6827c7b3f0e99ff120dfa14d65d2
Add multi-target tests

This adds a testcase exercising multi-target features.  It spawns 6
inferiors, like this:

 inferior 1 -> native
 inferior 2 -> extended-remote 1
 inferior 3 -> core
 inferior 4 -> native
 inferior 5 -> extended-remote 2
 inferior 6 -> core

and then tests various details, including:

 - running to breakpoints

 - interrupting with Ctrl-C and "interrupt -a"

 - "next" bouncing between two breakpoints in two threads running in
   different targets.

 - since we have cores and live inferiors mixed in the same session,
   this makes sure that gdb doesn't try to remove a core dump's
   threads.

 - all-stop and non-stop modes.

This testcase caught a _lot_ of bugs in development.

gdb/testsuite/ChangeLog:
2020-01-10  Pedro Alves  <palves@redhat.com>

* gdb.multi/multi-target.c: New file.
* gdb.multi/multi-target.exp: New file.
* lib/gdbserver-support.exp (gdb_target_cmd): Handle "Non-stop
mode requested, but remote does not support non-stop".
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.multi/multi-target.c [new file with mode: 0644]
gdb/testsuite/gdb.multi/multi-target.exp [new file with mode: 0644]
gdb/testsuite/lib/gdbserver-support.exp