gdb/testsuite: extend the use of mi_clean_restart
authorAndrew Burgess <aburgess@redhat.com>
Fri, 17 Feb 2023 14:56:39 +0000 (14:56 +0000)
committerAndrew Burgess <aburgess@redhat.com>
Tue, 28 Feb 2023 10:56:28 +0000 (10:56 +0000)
commit1ccc4abbb3dda91c94c54d3aaaa417f0d7740a3f
tree48bc949870c9189faede9b122b6eae741fa4a4f3
parentc8dfa492106ff57f3e1dd6731d5ba5b754f05616
gdb/testsuite: extend the use of mi_clean_restart

The mi_clean_restart proc calls the mi_gdb_start proc passing no
arguments.

In this commit I add an extra (optional) argument to the
mi_clean_restart proc, and pass this through to mi_gdb_start.

The benefit of this is that we can now use mi_clean_restart when we
also want to pass the 'separate-mi-tty' or 'separate-inferior-tty'
flags to mi_gdb_start, and avoids having to otherwise duplicate the
contents of mi_clean_restart in different tests.

I've updated the obvious places where this new functionality can be
used, and I'm seeing no test regressions.

Reviewed-By: Pedro Alves <pedro@palves.net>
gdb/testsuite/gdb.mi/mi-break.exp
gdb/testsuite/gdb.mi/mi-exec-run.exp
gdb/testsuite/gdb.mi/mi-multi-commands.exp
gdb/testsuite/gdb.mi/mi-watch.exp
gdb/testsuite/gdb.mi/new-ui-mi-sync.exp
gdb/testsuite/gdb.mi/user-selected-context-sync.exp
gdb/testsuite/lib/mi-support.exp