diff --git a/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp b/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp index fe842531977..03f9c135361 100644 --- a/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp +++ b/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp @@ -102,12 +102,16 @@ gdb_test "set scheduler-locking off" gdb_test "set debug infrun 1" set test "step" -gdb_test_sequence $test $test { - "need to step-over" - "resume_1: step=1," - "signal arrived while stepping over breakpoint" - "stepped to a different line" - "callme" +save_vars { gdb_prompt_full } { + set gdb_prompt_full \ + "$gdb_prompt_full\\\[infrun\\\] fetch_inferior_event: exit\r\n" + gdb_test_sequence $test $test { + "need to step-over" + "resume_1: step=1," + "signal arrived while stepping over breakpoint" + "stepped to a different line" + "callme" + } } set cnt_after [get_value "args\[$my_number\]" "get count after step"] diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 3f61da8adf1..cf64bd21305 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -142,6 +142,9 @@ if ![info exists gdb_prompt] then { set gdb_prompt "\\(gdb\\)" } +global gdb_prompt_full +set gdb_prompt_full "$gdb_prompt " + # A regexp that matches the pagination prompt. set pagination_prompt \ "--Type for more, q to quit, c to continue without paging--" @@ -1414,7 +1417,7 @@ proc gdb_test_no_output { args } { # -1 if there was an internal error. proc gdb_test_sequence { command test_name expected_output_list } { - global gdb_prompt + global gdb_prompt_full if { $test_name == "" } { set test_name $command } @@ -1422,7 +1425,7 @@ proc gdb_test_sequence { command test_name expected_output_list } { if { $command != "" } { send_gdb "$command\n" } - return [gdb_expect_list $test_name "$gdb_prompt $" $expected_output_list] + return [gdb_expect_list $test_name "$gdb_prompt_full$" $expected_output_list] }