Re: [PATCH] gdb: use gdb_test_multiple in gdb_breakpoint

Pedro Alves
2023-01-10T15:34:17Z

On 2023-01-05 4:28 p.m., Simon Marchi via Gdb-patches wrote:

> ---
> gdb/testsuite/lib/gdb.exp | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
> index e17eace4cb13..af538e5c8fbd 100644
> --- a/gdb/testsuite/lib/gdb.exp
> +++ b/gdb/testsuite/lib/gdb.exp
> @@ -657,6 +657,12 @@ proc gdb_breakpoint { linespec args } {
> send_gdb "$pending_response\n"
> exp_continue
> }
> + -re "$gdb_prompt $" {
> + if { $print_fail } {
> + fail $test_name
> + }
> + return 0
> + }
> }

The other removed "-re" cases also considered $print_fail, so if their replacement
inside gdb_test_multiple is hit, they'll produce a FAIL. Was that intended?
Should we instead add a "-nofail" option to gdb_test / gdb_test_multiple ?