aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.base')
-rw-r--r--gdb/testsuite/gdb.base/run-attach-while-running.exp8
1 files changed, 7 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.base/run-attach-while-running.exp b/gdb/testsuite/gdb.base/run-attach-while-running.exp
index 7c16aa6..1cc754a 100644
--- a/gdb/testsuite/gdb.base/run-attach-while-running.exp
+++ b/gdb/testsuite/gdb.base/run-attach-while-running.exp
@@ -33,6 +33,8 @@ unset binfile
# - run-or-attach: "run" or "attach"
proc_with_prefix test { non-stop threaded run-or-attach } {
+ global gdb_prompt
+
if { ${run-or-attach} == "attach" && ![can_spawn_for_attach] } {
unsupported "attach not supported"
return
@@ -91,7 +93,11 @@ proc_with_prefix test { non-stop threaded run-or-attach } {
set test_spawn_id [spawn_wait_for_attach $::binfile]
set test_pid [spawn_id_get_pid $test_spawn_id]
- gdb_test "attach $test_pid" "Attaching to program: .*" "attach to process"
+ gdb_test_multiple "attach $test_pid" "attach to process" {
+ -re "Attaching to program: .*$gdb_prompt " {
+ pass $gdb_test_name
+ }
+ }
gdb_exit
kill_wait_spawned_process $test_spawn_id