Introduce mi_runto_main
authorPedro Alves <pedro@palves.net>
Wed, 2 Sep 2020 22:06:19 +0000 (23:06 +0100)
committerPedro Alves <pedro@palves.net>
Tue, 13 Oct 2020 21:28:03 +0000 (22:28 +0100)
commitf71e6719e1c2dde20e3286ca7c4969f1c10eb523
treedf20aef81c1c8ebc58b8091390698cedeedeb392
parent50441f0f8c82686edae36da0e11914e624ea0bfc
Introduce mi_runto_main

This adds an mi_runto_main routine, very much like the runto_main CLI
counterpart.

Note there's already a mi_run_to_main (extra underscore in "run_to"),
but unlike its intro comment says, that does more than the CLI's
runto_main -- it also starts GDB.  I would like to eliminate that
other one by introducing a mi_clean_restart function instead.  That is
done later in the series.

gdb/testsuite/ChangeLog:

* lib/mi-support.exp (mi_runto_main): New proc.
(mi_run_to_main): Use it.
* gdb.mi/mi-catch-cpp-exceptions.exp: Likewise.
* gdb.mi/mi-var-cmd.exp: Likewise.
* gdb.mi/mi-var-invalidate.exp: Likewise.
* mi-var-list-children-invalid-grandchild.exp: Likewise.
* gdb.mi/mi2-amd64-entry-value.exp: Likewise.
* gdb.mi/new-ui-mi-sync.exp: Likewise.
* gdb.mi/user-selected-context-sync.exp: Likewise.
* gdb.opt/inline-cmds.exp: Likewise.
* gdb.python/py-framefilter-mi.exp: Likewise.
* gdb.python/py-mi.exp: Likewise.

Change-Id: I2e49ca7b0b61cea57c1202e5dfa32417e6a4403d
12 files changed:
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.mi/mi-catch-cpp-exceptions.exp
gdb/testsuite/gdb.mi/mi-var-cmd.exp
gdb/testsuite/gdb.mi/mi-var-invalidate.exp
gdb/testsuite/gdb.mi/mi-var-list-children-invalid-grandchild.exp
gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp
gdb/testsuite/gdb.mi/new-ui-mi-sync.exp
gdb/testsuite/gdb.mi/user-selected-context-sync.exp
gdb/testsuite/gdb.opt/inline-cmds.exp
gdb/testsuite/gdb.python/py-framefilter-mi.exp
gdb/testsuite/gdb.python/py-mi.exp
gdb/testsuite/lib/mi-support.exp