[gdb/testsuite] Add -lbl option in gdb_test_multiple
Add gdb_test_multiple option -lbl, that adds a regexp after the user code that
reads one line, and discards it:
...
-re "\r\n\[^\r\n\]*(?=\r\n)" {
exp_continue
}
...
In order to be able to write:
...
gdb_test_multiple "command" "testname" -lbl {
...
}
...
rewrite the promp_regexp argument usage into the similar:
...
gdb_test_multiple "command" "testname" -prompt $prompt_regexp {
...
}
...
Build and reg-tested on x86_64-linux.
Tested gdb.base/corefile-buildid.exp with both make targets check and
check-read1.
gdb/testsuite/ChangeLog:
2020-03-02 Pedro Alves <palves@redhat.com>
Tom de Vries <tdevries@suse.de>
* lib/gdb.exp (gdb_test_multiple): Handle prompt_regexp option using
-prompt prefix, before user_code argument. Add -lbl option likewise.
(skip_python_tests_prompt, skip_libstdcxx_probe_tests_prompt)
(gdb_is_target_1): Add -prompt prefix and move to before user_code
argument.
* gdb.base/corefile-buildid.exp: Use -lbl option. Rewrite regexps to
have "\r\n" at start-of-line, instead of at end-of-line.