aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.threads/check-libthread-db.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.threads/check-libthread-db.exp')
-rw-r--r--gdb/testsuite/gdb.threads/check-libthread-db.exp42
1 files changed, 22 insertions, 20 deletions
diff --git a/gdb/testsuite/gdb.threads/check-libthread-db.exp b/gdb/testsuite/gdb.threads/check-libthread-db.exp
index 5662eed..6976fe6 100644
--- a/gdb/testsuite/gdb.threads/check-libthread-db.exp
+++ b/gdb/testsuite/gdb.threads/check-libthread-db.exp
@@ -102,25 +102,27 @@ with_test_prefix "automated load-time check" {
}
# Automated load-time check with NPTL fully operational.
- with_test_prefix "libpthread.so fully initialized" {
- clean_restart ${binfile}
-
- gdb_test_no_output "maint set check-libthread-db 1"
- gdb_test_no_output "set debug libthread-db 1"
-
- set test_spawn_id [spawn_wait_for_attach $binfile]
- set testpid [spawn_id_get_pid $test_spawn_id]
-
- gdb_test_sequence "attach $testpid" \
- "check debug libthread-db output" {
- "\[\r\n\]+Running libthread_db integrity checks:"
- "\[\r\n\]+\[ \]+Got thread 0x\[1-9a-f\]\[0-9a-f\]+ => \[0-9\]+ => 0x\[1-9a-f\]\[0-9a-f\]+ ... OK"
- "\[\r\n\]+\[ \]+Got thread 0x\[1-9a-f\]\[0-9a-f\]+ => \[0-9\]+ => 0x\[1-9a-f\]\[0-9a-f\]+ ... OK"
- "\[\r\n\]+libthread_db integrity checks passed."
- "\[\r\n\]+[Thread debugging using libthread_db enabled]"
- }
-
- gdb_exit
- kill_wait_spawned_process $test_spawn_id
+ if { [can_spawn_for_attach] } {
+ with_test_prefix "libpthread.so fully initialized" {
+ clean_restart ${binfile}
+
+ gdb_test_no_output "maint set check-libthread-db 1"
+ gdb_test_no_output "set debug libthread-db 1"
+
+ set test_spawn_id [spawn_wait_for_attach $binfile]
+ set testpid [spawn_id_get_pid $test_spawn_id]
+
+ gdb_test_sequence "attach $testpid" \
+ "check debug libthread-db output" {
+ "\[\r\n\]+Running libthread_db integrity checks:"
+ "\[\r\n\]+\[ \]+Got thread 0x\[1-9a-f\]\[0-9a-f\]+ => \[0-9\]+ => 0x\[1-9a-f\]\[0-9a-f\]+ ... OK"
+ "\[\r\n\]+\[ \]+Got thread 0x\[1-9a-f\]\[0-9a-f\]+ => \[0-9\]+ => 0x\[1-9a-f\]\[0-9a-f\]+ ... OK"
+ "\[\r\n\]+libthread_db integrity checks passed."
+ "\[\r\n\]+[Thread debugging using libthread_db enabled]"
+ }
+
+ gdb_exit
+ kill_wait_spawned_process $test_spawn_id
+ }
}
}