diff options
author | Tom Tromey <tom@tromey.com> | 2023-01-25 10:36:09 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-01-26 18:28:31 -0700 |
commit | a30f2b7b7e689b3f1bd93c29a1e00c8d852145d3 (patch) | |
tree | 5413b2d4370ee9ce580e7038dc2f734f17819a3e | |
parent | 3ae2b57582b29fce26b00d38363533e761f946a5 (diff) | |
download | binutils-a30f2b7b7e689b3f1bd93c29a1e00c8d852145d3.zip binutils-a30f2b7b7e689b3f1bd93c29a1e00c8d852145d3.tar.gz binutils-a30f2b7b7e689b3f1bd93c29a1e00c8d852145d3.tar.bz2 |
Use clean_restart in gdb.threads
Change gdb.threads to use clean_restart more consistently.
-rw-r--r-- | gdb/testsuite/gdb.threads/attach-stopped.exp | 9 | ||||
-rw-r--r-- | gdb/testsuite/gdb.threads/fork-thread-pending.exp | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.threads/schedlock.exp | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.threads/watchthreads.exp | 6 |
4 files changed, 4 insertions, 23 deletions
diff --git a/gdb/testsuite/gdb.threads/attach-stopped.exp b/gdb/testsuite/gdb.threads/attach-stopped.exp index a3080c0..acdfcb5 100644 --- a/gdb/testsuite/gdb.threads/attach-stopped.exp +++ b/gdb/testsuite/gdb.threads/attach-stopped.exp @@ -32,11 +32,8 @@ remote_exec build "rm -f ${binfile}" #log_user 1 proc corefunc { threadtype } { - global srcfile global binfile global escapedbinfile - global srcdir - global subdir global gdb_prompt set test_spawn_id [spawn_wait_for_attach $binfile] @@ -45,11 +42,7 @@ proc corefunc { threadtype } { # Stop the program remote_exec build "kill -s STOP ${testpid}" - # Start with clean gdb - gdb_exit - gdb_start - gdb_reinitialize_dir $srcdir/$subdir - gdb_load ${binfile} + clean_restart $binfile # Verify that we can attach to the stopped process. diff --git a/gdb/testsuite/gdb.threads/fork-thread-pending.exp b/gdb/testsuite/gdb.threads/fork-thread-pending.exp index db72fb2..3ab2d31 100644 --- a/gdb/testsuite/gdb.threads/fork-thread-pending.exp +++ b/gdb/testsuite/gdb.threads/fork-thread-pending.exp @@ -79,11 +79,7 @@ gdb_test_multiple "info threads" "$test" { # Start over, but this time, don't switch away from the fork event thread. -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir - -gdb_load ${binfile} +clean_restart $binfile if {![runto_main]} { return 0 } diff --git a/gdb/testsuite/gdb.threads/schedlock.exp b/gdb/testsuite/gdb.threads/schedlock.exp index fa09550..0843501 100644 --- a/gdb/testsuite/gdb.threads/schedlock.exp +++ b/gdb/testsuite/gdb.threads/schedlock.exp @@ -146,11 +146,7 @@ proc step_ten_loops { cmd } { } } -# Start with a fresh gdb. - -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir +clean_restart # We'll need this when we send_gdb a ^C to GDB. Need to do it before we # run the program and gdb starts saving and restoring tty states. diff --git a/gdb/testsuite/gdb.threads/watchthreads.exp b/gdb/testsuite/gdb.threads/watchthreads.exp index 1aa7957..e80c60b 100644 --- a/gdb/testsuite/gdb.threads/watchthreads.exp +++ b/gdb/testsuite/gdb.threads/watchthreads.exp @@ -31,11 +31,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} - +clean_restart $binfile gdb_test_no_output "set can-use-hw-watchpoints 1" "" # |