+2021-05-05 Tom de Vries <tdevries@suse.de>
+
+ * gdb.threads/detach-step-over.exp: Do exp_continue when encountering
+ "Reading symbols" or "Expanding full symbols" lines. Using timeout
+ factor of 2 for attach.
+
2021-05-05 Tom de Vries <tdevries@suse.de>
* gdb.threads/fork-plus-threads.exp: Handle "New LWP <n>" and
with_test_prefix "iter $attempt" {
gdb_test "inferior 1" "Switching to .*"
- set attached 0
- set eperm 0
- set test "attach"
- gdb_test_multiple "attach $testpid" $test {
- -re "new threads in iteration" {
- # Seen when "set debug libthread_db" is on.
- exp_continue
- }
- -re "is a zombie - the process has already terminated.*$gdb_prompt " {
- fail $gdb_test_name
- }
- -re "Unable to attach: .*$gdb_prompt " {
- fail $gdb_test_name
- }
- -re "Attaching to program.*process $testpid.*$gdb_prompt " {
- pass $test
- set attached 1
+ with_timeout_factor 2 {
+ set attached 0
+ set saw_attaching 0
+ set eperm 0
+ set test "attach"
+ gdb_test_multiple "attach $testpid" $test {
+ -re "Attaching to program.*process $testpid\r\n" {
+ set saw_attaching 1
+ exp_continue
+ }
+ -re "new threads in iteration" {
+ # Seen when "set debug libthread_db" is on.
+ exp_continue
+ }
+ -re "Reading symbols from|Expanding full symbols from" {
+ # Prevent -readnow timeout.
+ exp_continue
+ }
+ -re "is a zombie - the process has already terminated.*$gdb_prompt " {
+ fail $gdb_test_name
+ }
+ -re "Unable to attach: .*$gdb_prompt " {
+ fail $gdb_test_name
+ }
+ -re "\r\n$gdb_prompt " {
+ if { $saw_attaching } {
+ set attached 1
+ pass $test
+ } else {
+ fail $test
+ }
+ }
}
}