[gdb/testsuite] Simplify gdb.base/info-types.exp.tcl further
After adding support for --any in match_line, we can simplify
gdb.base/info-types.exp.tcl further: we can add the "All defined types:"
regexp in the output_lines list:
...
set output_lines \
[list \
+ "All defined types:" \
+ "--any" \
$file_re \
...
Consequently, we can simplify the state machine to track a variable "found"
with values:
- 0 (unmatched)
- 1 (matched)
- -1 (mismatch).
This makes the code generic enough to factor out into a new proc
gdb_test_lines.
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2021-06-08 Tom de Vries <tdevries@suse.de>
* gdb.base/info-types.exp.tcl (match_line): Handle --any.
(gdb_test_lines): Factor out of ...
(run_test): ... here.