aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.threads
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.threads')
-rw-r--r--gdb/testsuite/gdb.threads/access-mem-running-thread-exit.c2
-rw-r--r--gdb/testsuite/gdb.threads/access-mem-running-thread-exit.exp93
-rw-r--r--gdb/testsuite/gdb.threads/async.c2
-rw-r--r--gdb/testsuite/gdb.threads/async.exp4
-rw-r--r--gdb/testsuite/gdb.threads/attach-into-signal.c2
-rw-r--r--gdb/testsuite/gdb.threads/attach-into-signal.exp2
-rw-r--r--gdb/testsuite/gdb.threads/attach-many-short-lived-threads.c2
-rw-r--r--gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp2
-rw-r--r--gdb/testsuite/gdb.threads/attach-non-stop.c2
-rw-r--r--gdb/testsuite/gdb.threads/attach-non-stop.exp4
-rw-r--r--gdb/testsuite/gdb.threads/attach-slow-waitpid.c2
-rw-r--r--gdb/testsuite/gdb.threads/attach-slow-waitpid.exp2
-rw-r--r--gdb/testsuite/gdb.threads/attach-stopped.c2
-rw-r--r--gdb/testsuite/gdb.threads/attach-stopped.exp4
-rw-r--r--gdb/testsuite/gdb.threads/bp_in_thread.c2
-rw-r--r--gdb/testsuite/gdb.threads/bp_in_thread.exp4
-rw-r--r--gdb/testsuite/gdb.threads/break-while-running.c2
-rw-r--r--gdb/testsuite/gdb.threads/break-while-running.exp4
-rw-r--r--gdb/testsuite/gdb.threads/check-libthread-db.c2
-rw-r--r--gdb/testsuite/gdb.threads/check-libthread-db.exp8
-rw-r--r--gdb/testsuite/gdb.threads/clone-attach-detach.c2
-rw-r--r--gdb/testsuite/gdb.threads/clone-attach-detach.exp4
-rw-r--r--gdb/testsuite/gdb.threads/clone-new-thread-event.c2
-rw-r--r--gdb/testsuite/gdb.threads/clone-new-thread-event.exp2
-rw-r--r--gdb/testsuite/gdb.threads/clone-thread_db.c2
-rw-r--r--gdb/testsuite/gdb.threads/clone-thread_db.exp2
-rw-r--r--gdb/testsuite/gdb.threads/continue-pending-after-query.c2
-rw-r--r--gdb/testsuite/gdb.threads/continue-pending-after-query.exp2
-rw-r--r--gdb/testsuite/gdb.threads/continue-pending-status.c2
-rw-r--r--gdb/testsuite/gdb.threads/continue-pending-status.exp2
-rw-r--r--gdb/testsuite/gdb.threads/corethreads.c2
-rw-r--r--gdb/testsuite/gdb.threads/corethreads.exp3
-rw-r--r--gdb/testsuite/gdb.threads/create-fail.c2
-rw-r--r--gdb/testsuite/gdb.threads/create-fail.exp2
-rw-r--r--gdb/testsuite/gdb.threads/current-lwp-dead.c2
-rw-r--r--gdb/testsuite/gdb.threads/current-lwp-dead.exp4
-rw-r--r--gdb/testsuite/gdb.threads/del-pending-thread-bp-lib.c2
-rw-r--r--gdb/testsuite/gdb.threads/del-pending-thread-bp.c2
-rw-r--r--gdb/testsuite/gdb.threads/del-pending-thread-bp.exp2
-rw-r--r--gdb/testsuite/gdb.threads/detach-step-over.c2
-rw-r--r--gdb/testsuite/gdb.threads/detach-step-over.exp6
-rw-r--r--gdb/testsuite/gdb.threads/dlopen-libpthread-lib.c2
-rw-r--r--gdb/testsuite/gdb.threads/dlopen-libpthread.c2
-rw-r--r--gdb/testsuite/gdb.threads/dlopen-libpthread.exp2
-rw-r--r--gdb/testsuite/gdb.threads/execl.c2
-rw-r--r--gdb/testsuite/gdb.threads/execl.exp4
-rw-r--r--gdb/testsuite/gdb.threads/execl1.c2
-rw-r--r--gdb/testsuite/gdb.threads/foll-fork-other-thread.c2
-rw-r--r--gdb/testsuite/gdb.threads/foll-fork-other-thread.exp6
-rw-r--r--gdb/testsuite/gdb.threads/fork-child-threads.c2
-rw-r--r--gdb/testsuite/gdb.threads/fork-child-threads.exp9
-rw-r--r--gdb/testsuite/gdb.threads/fork-plus-threads.c2
-rw-r--r--gdb/testsuite/gdb.threads/fork-plus-threads.exp4
-rw-r--r--gdb/testsuite/gdb.threads/fork-thread-pending.c2
-rw-r--r--gdb/testsuite/gdb.threads/fork-thread-pending.exp12
-rw-r--r--gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.c2
-rw-r--r--gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.exp8
-rw-r--r--gdb/testsuite/gdb.threads/gcore-stale-thread.c2
-rw-r--r--gdb/testsuite/gdb.threads/gcore-stale-thread.exp2
-rw-r--r--gdb/testsuite/gdb.threads/gcore-thread.exp2
-rw-r--r--gdb/testsuite/gdb.threads/hand-call-in-threads.c2
-rw-r--r--gdb/testsuite/gdb.threads/hand-call-in-threads.exp4
-rw-r--r--gdb/testsuite/gdb.threads/hand-call-new-thread.c2
-rw-r--r--gdb/testsuite/gdb.threads/hand-call-new-thread.exp2
-rw-r--r--gdb/testsuite/gdb.threads/ia64-sigill.c2
-rw-r--r--gdb/testsuite/gdb.threads/ia64-sigill.exp2
-rw-r--r--gdb/testsuite/gdb.threads/inf-thr-count.c2
-rw-r--r--gdb/testsuite/gdb.threads/inf-thr-count.exp61
-rw-r--r--gdb/testsuite/gdb.threads/infcall-from-bp-cond-other-thread-event.c2
-rw-r--r--gdb/testsuite/gdb.threads/infcall-from-bp-cond-other-thread-event.exp4
-rw-r--r--gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.c2
-rw-r--r--gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp12
-rw-r--r--gdb/testsuite/gdb.threads/infcall-from-bp-cond-single.c2
-rw-r--r--gdb/testsuite/gdb.threads/infcall-from-bp-cond-single.exp4
-rw-r--r--gdb/testsuite/gdb.threads/infcall-from-bp-cond-timeout.c2
-rw-r--r--gdb/testsuite/gdb.threads/infcall-from-bp-cond-timeout.exp4
-rw-r--r--gdb/testsuite/gdb.threads/infcall-thread-announce.c2
-rw-r--r--gdb/testsuite/gdb.threads/infcall-thread-announce.exp2
-rw-r--r--gdb/testsuite/gdb.threads/info-threads-cur-sal-2.c2
-rw-r--r--gdb/testsuite/gdb.threads/info-threads-cur-sal.c2
-rw-r--r--gdb/testsuite/gdb.threads/info-threads-cur-sal.exp2
-rw-r--r--gdb/testsuite/gdb.threads/info-threads-options.c77
-rw-r--r--gdb/testsuite/gdb.threads/info-threads-options.exp131
-rw-r--r--gdb/testsuite/gdb.threads/interrupt-while-step-over.c2
-rw-r--r--gdb/testsuite/gdb.threads/interrupt-while-step-over.exp4
-rw-r--r--gdb/testsuite/gdb.threads/interrupted-hand-call.c2
-rw-r--r--gdb/testsuite/gdb.threads/interrupted-hand-call.exp4
-rw-r--r--gdb/testsuite/gdb.threads/kill.c2
-rw-r--r--gdb/testsuite/gdb.threads/kill.exp2
-rw-r--r--gdb/testsuite/gdb.threads/killed-outside.c2
-rw-r--r--gdb/testsuite/gdb.threads/killed-outside.exp2
-rw-r--r--gdb/testsuite/gdb.threads/killed.c2
-rw-r--r--gdb/testsuite/gdb.threads/killed.exp4
-rw-r--r--gdb/testsuite/gdb.threads/leader-exit-attach.exp4
-rw-r--r--gdb/testsuite/gdb.threads/leader-exit.c2
-rw-r--r--gdb/testsuite/gdb.threads/leader-exit.exp2
-rw-r--r--gdb/testsuite/gdb.threads/linux-dp.exp4
-rw-r--r--gdb/testsuite/gdb.threads/local-watch-wrong-thread.c2
-rw-r--r--gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp4
-rw-r--r--gdb/testsuite/gdb.threads/main-thread-exit-during-detach.c2
-rw-r--r--gdb/testsuite/gdb.threads/main-thread-exit-during-detach.exp4
-rw-r--r--gdb/testsuite/gdb.threads/manythreads.c2
-rw-r--r--gdb/testsuite/gdb.threads/manythreads.exp4
-rw-r--r--gdb/testsuite/gdb.threads/multi-create-ns-info-thr.exp2
-rw-r--r--gdb/testsuite/gdb.threads/multi-create.c2
-rw-r--r--gdb/testsuite/gdb.threads/multi-create.exp4
-rw-r--r--gdb/testsuite/gdb.threads/multiple-step-overs.c2
-rw-r--r--gdb/testsuite/gdb.threads/multiple-step-overs.exp2
-rw-r--r--gdb/testsuite/gdb.threads/multiple-successive-infcall.c2
-rw-r--r--gdb/testsuite/gdb.threads/multiple-successive-infcall.exp4
-rw-r--r--gdb/testsuite/gdb.threads/names.c2
-rw-r--r--gdb/testsuite/gdb.threads/names.exp2
-rw-r--r--gdb/testsuite/gdb.threads/next-bp-other-thread.c2
-rw-r--r--gdb/testsuite/gdb.threads/next-bp-other-thread.exp4
-rw-r--r--gdb/testsuite/gdb.threads/next-fork-exec-other-thread.c2
-rw-r--r--gdb/testsuite/gdb.threads/next-fork-exec-other-thread.exp6
-rw-r--r--gdb/testsuite/gdb.threads/next-fork-other-thread.c2
-rw-r--r--gdb/testsuite/gdb.threads/next-fork-other-thread.exp6
-rw-r--r--gdb/testsuite/gdb.threads/next-while-other-thread-longjmps.c2
-rw-r--r--gdb/testsuite/gdb.threads/next-while-other-thread-longjmps.exp2
-rw-r--r--gdb/testsuite/gdb.threads/no-unwaited-for-left.c2
-rw-r--r--gdb/testsuite/gdb.threads/no-unwaited-for-left.exp2
-rw-r--r--gdb/testsuite/gdb.threads/non-ldr-exc-1.c2
-rw-r--r--gdb/testsuite/gdb.threads/non-ldr-exc-1.exp2
-rw-r--r--gdb/testsuite/gdb.threads/non-ldr-exc-2.c2
-rw-r--r--gdb/testsuite/gdb.threads/non-ldr-exc-2.exp2
-rw-r--r--gdb/testsuite/gdb.threads/non-ldr-exc-3.c2
-rw-r--r--gdb/testsuite/gdb.threads/non-ldr-exc-3.exp2
-rw-r--r--gdb/testsuite/gdb.threads/non-ldr-exc-4.c2
-rw-r--r--gdb/testsuite/gdb.threads/non-ldr-exc-4.exp2
-rw-r--r--gdb/testsuite/gdb.threads/non-ldr-exit.c2
-rw-r--r--gdb/testsuite/gdb.threads/non-ldr-exit.exp2
-rw-r--r--gdb/testsuite/gdb.threads/non-stop-fair-events.c2
-rw-r--r--gdb/testsuite/gdb.threads/non-stop-fair-events.exp2
-rw-r--r--gdb/testsuite/gdb.threads/omp-par-scope.c2
-rw-r--r--gdb/testsuite/gdb.threads/omp-par-scope.exp2
-rw-r--r--gdb/testsuite/gdb.threads/omp-task.c2
-rw-r--r--gdb/testsuite/gdb.threads/omp-task.exp2
-rw-r--r--gdb/testsuite/gdb.threads/pending-fork-event-detach-ns.c2
-rw-r--r--gdb/testsuite/gdb.threads/pending-fork-event-detach-ns.exp6
-rw-r--r--gdb/testsuite/gdb.threads/pending-fork-event-detach-touch-file.c2
-rw-r--r--gdb/testsuite/gdb.threads/pending-fork-event-detach.c2
-rw-r--r--gdb/testsuite/gdb.threads/pending-fork-event-detach.exp7
-rw-r--r--gdb/testsuite/gdb.threads/pending-step.c2
-rw-r--r--gdb/testsuite/gdb.threads/pending-step.exp4
-rw-r--r--gdb/testsuite/gdb.threads/print-threads.exp4
-rw-r--r--gdb/testsuite/gdb.threads/process-dies-while-detaching.c2
-rw-r--r--gdb/testsuite/gdb.threads/process-dies-while-detaching.exp14
-rw-r--r--gdb/testsuite/gdb.threads/process-dies-while-handling-bp.c2
-rw-r--r--gdb/testsuite/gdb.threads/process-dies-while-handling-bp.exp4
-rw-r--r--gdb/testsuite/gdb.threads/process-exit-status-is-leader-exit-status.c2
-rw-r--r--gdb/testsuite/gdb.threads/process-exit-status-is-leader-exit-status.exp2
-rw-r--r--gdb/testsuite/gdb.threads/pthread_cond_wait.c2
-rw-r--r--gdb/testsuite/gdb.threads/pthread_cond_wait.exp4
-rw-r--r--gdb/testsuite/gdb.threads/pthreads.c2
-rw-r--r--gdb/testsuite/gdb.threads/pthreads.exp4
-rw-r--r--gdb/testsuite/gdb.threads/queue-signal.c2
-rw-r--r--gdb/testsuite/gdb.threads/queue-signal.exp4
-rw-r--r--gdb/testsuite/gdb.threads/reconnect-signal.c2
-rw-r--r--gdb/testsuite/gdb.threads/reconnect-signal.exp2
-rw-r--r--gdb/testsuite/gdb.threads/schedlock-new-thread.c2
-rw-r--r--gdb/testsuite/gdb.threads/schedlock-new-thread.exp4
-rw-r--r--gdb/testsuite/gdb.threads/schedlock-thread-exit.c2
-rw-r--r--gdb/testsuite/gdb.threads/schedlock-thread-exit.exp4
-rw-r--r--gdb/testsuite/gdb.threads/schedlock.c2
-rw-r--r--gdb/testsuite/gdb.threads/schedlock.exp2
-rw-r--r--gdb/testsuite/gdb.threads/siginfo-threads.c2
-rw-r--r--gdb/testsuite/gdb.threads/siginfo-threads.exp2
-rw-r--r--gdb/testsuite/gdb.threads/signal-command-handle-nopass.c2
-rw-r--r--gdb/testsuite/gdb.threads/signal-command-handle-nopass.exp4
-rw-r--r--gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.c2
-rw-r--r--gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.exp4
-rw-r--r--gdb/testsuite/gdb.threads/signal-delivered-right-thread.c2
-rw-r--r--gdb/testsuite/gdb.threads/signal-delivered-right-thread.exp4
-rw-r--r--gdb/testsuite/gdb.threads/signal-sigtrap.c2
-rw-r--r--gdb/testsuite/gdb.threads/signal-sigtrap.exp4
-rw-r--r--gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.c2
-rw-r--r--gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp2
-rw-r--r--gdb/testsuite/gdb.threads/sigstep-threads.c2
-rw-r--r--gdb/testsuite/gdb.threads/sigstep-threads.exp2
-rw-r--r--gdb/testsuite/gdb.threads/sigthread.exp4
-rw-r--r--gdb/testsuite/gdb.threads/slow-waitpid.c2
-rw-r--r--gdb/testsuite/gdb.threads/staticthreads.c2
-rw-r--r--gdb/testsuite/gdb.threads/staticthreads.exp6
-rw-r--r--gdb/testsuite/gdb.threads/step-N-all-progress.c2
-rw-r--r--gdb/testsuite/gdb.threads/step-N-all-progress.exp4
-rw-r--r--gdb/testsuite/gdb.threads/step-bg-decr-pc-switch-thread.c2
-rw-r--r--gdb/testsuite/gdb.threads/step-bg-decr-pc-switch-thread.exp2
-rw-r--r--gdb/testsuite/gdb.threads/step-over-exec-execd.c2
-rw-r--r--gdb/testsuite/gdb.threads/step-over-exec.c2
-rw-r--r--gdb/testsuite/gdb.threads/step-over-exec.exp5
-rw-r--r--gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.c2
-rw-r--r--gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.exp2
-rw-r--r--gdb/testsuite/gdb.threads/step-over-thread-exit-while-stop-all-threads.c2
-rw-r--r--gdb/testsuite/gdb.threads/step-over-thread-exit-while-stop-all-threads.exp4
-rw-r--r--gdb/testsuite/gdb.threads/step-over-thread-exit.c2
-rw-r--r--gdb/testsuite/gdb.threads/step-over-thread-exit.exp4
-rw-r--r--gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.c2
-rw-r--r--gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp2
-rw-r--r--gdb/testsuite/gdb.threads/stepi-over-clone.c2
-rw-r--r--gdb/testsuite/gdb.threads/stepi-over-clone.exp4
-rw-r--r--gdb/testsuite/gdb.threads/stepi-random-signal.c2
-rw-r--r--gdb/testsuite/gdb.threads/stepi-random-signal.exp2
-rw-r--r--gdb/testsuite/gdb.threads/stop-with-handle.c2
-rw-r--r--gdb/testsuite/gdb.threads/stop-with-handle.exp2
-rw-r--r--gdb/testsuite/gdb.threads/switch-threads.c2
-rw-r--r--gdb/testsuite/gdb.threads/switch-threads.exp4
-rw-r--r--gdb/testsuite/gdb.threads/thread-bp-deleted.c2
-rw-r--r--gdb/testsuite/gdb.threads/thread-bp-deleted.exp6
-rw-r--r--gdb/testsuite/gdb.threads/thread-execl.c12
-rw-r--r--gdb/testsuite/gdb.threads/thread-execl.exp4
-rw-r--r--gdb/testsuite/gdb.threads/thread-find.exp4
-rw-r--r--gdb/testsuite/gdb.threads/thread-specific-bp.c2
-rw-r--r--gdb/testsuite/gdb.threads/thread-specific-bp.exp4
-rw-r--r--gdb/testsuite/gdb.threads/thread-specific.c2
-rw-r--r--gdb/testsuite/gdb.threads/thread-specific.exp4
-rw-r--r--gdb/testsuite/gdb.threads/thread-unwindonsignal.exp4
-rw-r--r--gdb/testsuite/gdb.threads/thread_check.c2
-rw-r--r--gdb/testsuite/gdb.threads/thread_check.exp4
-rw-r--r--gdb/testsuite/gdb.threads/thread_events.c2
-rw-r--r--gdb/testsuite/gdb.threads/thread_events.exp2
-rw-r--r--gdb/testsuite/gdb.threads/threadapply.c2
-rw-r--r--gdb/testsuite/gdb.threads/threadapply.exp14
-rw-r--r--gdb/testsuite/gdb.threads/threadcrash.c2
-rw-r--r--gdb/testsuite/gdb.threads/threadcrash.exp6
-rw-r--r--gdb/testsuite/gdb.threads/threads-after-exec.c2
-rw-r--r--gdb/testsuite/gdb.threads/threads-after-exec.exp2
-rw-r--r--gdb/testsuite/gdb.threads/threxit-hop-specific.c2
-rw-r--r--gdb/testsuite/gdb.threads/threxit-hop-specific.exp4
-rw-r--r--gdb/testsuite/gdb.threads/tid-reuse.c2
-rw-r--r--gdb/testsuite/gdb.threads/tid-reuse.exp2
-rw-r--r--gdb/testsuite/gdb.threads/tls-core.c2
-rw-r--r--gdb/testsuite/gdb.threads/tls-core.exp6
-rw-r--r--gdb/testsuite/gdb.threads/tls-nodebug-pie.c2
-rw-r--r--gdb/testsuite/gdb.threads/tls-nodebug-pie.exp4
-rw-r--r--gdb/testsuite/gdb.threads/tls-nodebug.exp4
-rw-r--r--gdb/testsuite/gdb.threads/tls-sepdebug-main.c2
-rw-r--r--gdb/testsuite/gdb.threads/tls-sepdebug-shared.c2
-rw-r--r--gdb/testsuite/gdb.threads/tls-sepdebug.exp2
-rw-r--r--gdb/testsuite/gdb.threads/tls-shared.exp4
-rw-r--r--gdb/testsuite/gdb.threads/tls-so_extern.c2
-rw-r--r--gdb/testsuite/gdb.threads/tls-so_extern.exp4
-rw-r--r--gdb/testsuite/gdb.threads/tls-so_extern_main.c2
-rw-r--r--gdb/testsuite/gdb.threads/tls-var-main.c2
-rw-r--r--gdb/testsuite/gdb.threads/tls-var.c2
-rw-r--r--gdb/testsuite/gdb.threads/tls-var.exp2
-rw-r--r--gdb/testsuite/gdb.threads/tls.exp6
-rw-r--r--gdb/testsuite/gdb.threads/tls2.c2
-rw-r--r--gdb/testsuite/gdb.threads/vfork-follow-child-exec.c2
-rw-r--r--gdb/testsuite/gdb.threads/vfork-follow-child-exec.exp6
-rw-r--r--gdb/testsuite/gdb.threads/vfork-follow-child-exit.c2
-rw-r--r--gdb/testsuite/gdb.threads/vfork-follow-child-exit.exp6
-rw-r--r--gdb/testsuite/gdb.threads/vfork-multi-inferior-sleep.c2
-rw-r--r--gdb/testsuite/gdb.threads/vfork-multi-inferior.c2
-rw-r--r--gdb/testsuite/gdb.threads/vfork-multi-inferior.exp6
-rw-r--r--gdb/testsuite/gdb.threads/vfork-multi-thread.c2
-rw-r--r--gdb/testsuite/gdb.threads/vfork-multi-thread.exp6
-rw-r--r--gdb/testsuite/gdb.threads/watchpoint-fork-child.c2
-rw-r--r--gdb/testsuite/gdb.threads/watchpoint-fork-mt.c2
-rw-r--r--gdb/testsuite/gdb.threads/watchpoint-fork-parent.c2
-rw-r--r--gdb/testsuite/gdb.threads/watchpoint-fork-st.c2
-rw-r--r--gdb/testsuite/gdb.threads/watchpoint-fork.exp4
-rw-r--r--gdb/testsuite/gdb.threads/watchpoint-fork.h2
-rw-r--r--gdb/testsuite/gdb.threads/watchthreads-reorder.c2
-rw-r--r--gdb/testsuite/gdb.threads/watchthreads-reorder.exp2
-rw-r--r--gdb/testsuite/gdb.threads/watchthreads.c2
-rw-r--r--gdb/testsuite/gdb.threads/watchthreads.exp4
-rw-r--r--gdb/testsuite/gdb.threads/watchthreads2.c2
-rw-r--r--gdb/testsuite/gdb.threads/watchthreads2.exp4
-rw-r--r--gdb/testsuite/gdb.threads/wp-replication.c2
-rw-r--r--gdb/testsuite/gdb.threads/wp-replication.exp4
271 files changed, 706 insertions, 442 deletions
diff --git a/gdb/testsuite/gdb.threads/access-mem-running-thread-exit.c b/gdb/testsuite/gdb.threads/access-mem-running-thread-exit.c
index e22bf12..d4cde31 100644
--- a/gdb/testsuite/gdb.threads/access-mem-running-thread-exit.c
+++ b/gdb/testsuite/gdb.threads/access-mem-running-thread-exit.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2021-2024 Free Software Foundation, Inc.
+ Copyright 2021-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/access-mem-running-thread-exit.exp b/gdb/testsuite/gdb.threads/access-mem-running-thread-exit.exp
index 42222c0..6846b38 100644
--- a/gdb/testsuite/gdb.threads/access-mem-running-thread-exit.exp
+++ b/gdb/testsuite/gdb.threads/access-mem-running-thread-exit.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2021-2024 Free Software Foundation, Inc.
+# Copyright (C) 2021-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -51,7 +51,7 @@ proc test { non_stop } {
save_vars { GDBFLAGS } {
append GDBFLAGS " -ex \"set non-stop $non_stop\""
- clean_restart ${binfile}
+ clean_restart ${::testfile}
}
if ![runto setup_done] {
@@ -74,42 +74,45 @@ proc test { non_stop } {
delete_breakpoints
# Start the second inferior.
- with_test_prefix "second inferior" {
- # With stub targets that do reload on run, if we let the new
- # inferior share inferior 1's connection, runto would
- # fail because GDB is already connected to something, like
- # e.g. with --target_board=native-gdbserver:
- #
- # (gdb) kill
- # ...
- # (gdb) target remote localhost:2348
- # Already connected to a remote target. Disconnect? (y or n)
- #
- # Instead, start the inferior with no connection, and let
- # gdb_load/runto spawn a new remote connection/gdbserver.
- #
- # OTOH, with extended-remote, we must let the new inferior
- # reuse the current connection, so that runto below can
- # issue the "run" command, and have the inferior run on the
- # remote target. If we forced no connection, then "run" would
- # either fail if "set auto-connect-native-target" is on, like
- # the native-extended-gdbserver board enforces, or it would
- # run the inferior on the native target, which isn't what is
- # being tested.
- #
- # Since it's reload_on_run targets that need special care, we
- # default to reusing the connection on most targets.
- if [target_info exists gdb,do_reload_on_run] {
- gdb_test "add-inferior -no-connection" "New inferior 2.*"
- } else {
- gdb_test "add-inferior" "New inferior 2.*"
- }
- gdb_test "inferior 2" "Switching to inferior 2 .*"
-
- gdb_load $binfile
-
- if ![runto setup_done] {
- return -1
+ if {[allow_multi_inferior_tests]} {
+ with_test_prefix "second inferior" {
+ # With stub targets that do reload on run, if we let the
+ # new inferior share inferior 1's connection, runto would
+ # fail because GDB is already connected to something, like
+ # e.g. with --target_board=native-gdbserver:
+ #
+ # (gdb) kill
+ # ...
+ # (gdb) target remote localhost:2348
+ # Already connected to a remote target. Disconnect? (y or n)
+ #
+ # Instead, start the inferior with no connection, and let
+ # gdb_load/runto spawn a new remote connection/gdbserver.
+ #
+ # OTOH, with extended-remote, we must let the new inferior
+ # reuse the current connection, so that runto below can
+ # issue the "run" command, and have the inferior run on
+ # the remote target. If we forced no connection, then
+ # "run" would either fail if "set
+ # auto-connect-native-target" is on, like the
+ # native-extended-gdbserver board enforces, or it would
+ # run the inferior on the native target, which isn't what
+ # is being tested.
+ #
+ # Since it's reload_on_run targets that need special care,
+ # we default to reusing the connection on most targets.
+ if [target_info exists gdb,do_reload_on_run] {
+ gdb_test "add-inferior -no-connection" "New inferior 2.*"
+ } else {
+ gdb_test "add-inferior" "New inferior 2.*"
+ }
+ gdb_test "inferior 2" "Switching to inferior 2 .*"
+
+ gdb_load $binfile
+
+ if ![runto setup_done] {
+ return -1
+ }
}
}
@@ -158,13 +161,15 @@ proc test { non_stop } {
verbose -log "xxxxx: iteration $iter"
gdb_test -nopass "info threads"
- if {$inf == 1} {
- set inf 2
- } else {
- set inf 1
- }
+ if {[allow_multi_inferior_tests]} {
+ if {$inf == 1} {
+ set inf 2
+ } else {
+ set inf 1
+ }
- my_gdb_test "inferior $inf" ".*" "inferior $inf"
+ my_gdb_test "inferior $inf" ".*" "inferior $inf"
+ }
my_gdb_test "print global_var = 555" " = 555" \
"write to global_var"
diff --git a/gdb/testsuite/gdb.threads/async.c b/gdb/testsuite/gdb.threads/async.c
index b27b9b4..3f97c75 100644
--- a/gdb/testsuite/gdb.threads/async.c
+++ b/gdb/testsuite/gdb.threads/async.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2019-2024 Free Software Foundation, Inc.
+ Copyright 2019-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/async.exp b/gdb/testsuite/gdb.threads/async.exp
index ba0377a..6347333 100644
--- a/gdb/testsuite/gdb.threads/async.exp
+++ b/gdb/testsuite/gdb.threads/async.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2019-2024 Free Software Foundation, Inc.
+# Copyright (C) 2019-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -32,7 +32,7 @@ proc test_current_thread {expected_thr} {
global gdb_prompt
global binfile
- clean_restart $binfile
+ clean_restart $::testfile
if {![runto "all_started"]} {
return
diff --git a/gdb/testsuite/gdb.threads/attach-into-signal.c b/gdb/testsuite/gdb.threads/attach-into-signal.c
index d998bb1..7299477 100644
--- a/gdb/testsuite/gdb.threads/attach-into-signal.c
+++ b/gdb/testsuite/gdb.threads/attach-into-signal.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2008-2024 Free Software Foundation, Inc.
+ Copyright 2008-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/attach-into-signal.exp b/gdb/testsuite/gdb.threads/attach-into-signal.exp
index 91da960..0629736 100644
--- a/gdb/testsuite/gdb.threads/attach-into-signal.exp
+++ b/gdb/testsuite/gdb.threads/attach-into-signal.exp
@@ -1,4 +1,4 @@
-# Copyright 2008-2024 Free Software Foundation, Inc.
+# Copyright 2008-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.c b/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.c
index 74a71c5..378853b 100644
--- a/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.c
+++ b/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2014-2024 Free Software Foundation, Inc.
+ Copyright 2014-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp b/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp
index 8883485..1b10d7e 100644
--- a/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp
+++ b/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp
@@ -1,4 +1,4 @@
-# Copyright 2008-2024 Free Software Foundation, Inc.
+# Copyright 2008-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/attach-non-stop.c b/gdb/testsuite/gdb.threads/attach-non-stop.c
index f189954..6e3423b 100644
--- a/gdb/testsuite/gdb.threads/attach-non-stop.c
+++ b/gdb/testsuite/gdb.threads/attach-non-stop.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2021-2024 Free Software Foundation, Inc.
+ Copyright 2021-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/attach-non-stop.exp b/gdb/testsuite/gdb.threads/attach-non-stop.exp
index eb12e6b..b8da5b1 100644
--- a/gdb/testsuite/gdb.threads/attach-non-stop.exp
+++ b/gdb/testsuite/gdb.threads/attach-non-stop.exp
@@ -1,4 +1,4 @@
-# Copyright 2021-2024 Free Software Foundation, Inc.
+# Copyright 2021-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -37,7 +37,7 @@ proc test {target_non_stop non_stop cmd} {
save_vars { GDBFLAGS } {
append GDBFLAGS " -ex \"maint set target-non-stop $target_non_stop\""
append GDBFLAGS " -ex \"set non-stop $non_stop\""
- clean_restart $binfile
+ clean_restart $::testfile
}
set test_spawn_id [spawn_wait_for_attach $binfile]
diff --git a/gdb/testsuite/gdb.threads/attach-slow-waitpid.c b/gdb/testsuite/gdb.threads/attach-slow-waitpid.c
index 9cb9047..81bf13d 100644
--- a/gdb/testsuite/gdb.threads/attach-slow-waitpid.c
+++ b/gdb/testsuite/gdb.threads/attach-slow-waitpid.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2018-2024 Free Software Foundation, Inc.
+ Copyright 2018-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/attach-slow-waitpid.exp b/gdb/testsuite/gdb.threads/attach-slow-waitpid.exp
index 942088f..a22187a 100644
--- a/gdb/testsuite/gdb.threads/attach-slow-waitpid.exp
+++ b/gdb/testsuite/gdb.threads/attach-slow-waitpid.exp
@@ -1,4 +1,4 @@
-# Copyright 2018-2024 Free Software Foundation, Inc.
+# Copyright 2018-2025 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/attach-stopped.c b/gdb/testsuite/gdb.threads/attach-stopped.c
index 5a83af5..04ffc58 100644
--- a/gdb/testsuite/gdb.threads/attach-stopped.c
+++ b/gdb/testsuite/gdb.threads/attach-stopped.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2008-2024 Free Software Foundation, Inc.
+ Copyright 2008-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/attach-stopped.exp b/gdb/testsuite/gdb.threads/attach-stopped.exp
index 0421ffc..a3926d9 100644
--- a/gdb/testsuite/gdb.threads/attach-stopped.exp
+++ b/gdb/testsuite/gdb.threads/attach-stopped.exp
@@ -1,4 +1,4 @@
-# Copyright 2008-2024 Free Software Foundation, Inc.
+# Copyright 2008-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -43,7 +43,7 @@ proc corefunc { threadtype } {
# Stop the program
remote_exec build "kill -s STOP ${testpid}"
- clean_restart $binfile
+ clean_restart $::testfile
# Verify that we can attach to the stopped process.
diff --git a/gdb/testsuite/gdb.threads/bp_in_thread.c b/gdb/testsuite/gdb.threads/bp_in_thread.c
index 0c5746d..9244efe 100644
--- a/gdb/testsuite/gdb.threads/bp_in_thread.c
+++ b/gdb/testsuite/gdb.threads/bp_in_thread.c
@@ -1,6 +1,6 @@
/* A small multi-threaded test case.
- Copyright 2004-2024 Free Software Foundation, Inc.
+ Copyright 2004-2025 Free Software Foundation, Inc.
This file is part of GDB.
diff --git a/gdb/testsuite/gdb.threads/bp_in_thread.exp b/gdb/testsuite/gdb.threads/bp_in_thread.exp
index f31c5cd..5180c18 100644
--- a/gdb/testsuite/gdb.threads/bp_in_thread.exp
+++ b/gdb/testsuite/gdb.threads/bp_in_thread.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2024 Free Software Foundation, Inc.
+# Copyright (C) 2004-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
return -1
}
-clean_restart $binfile
+clean_restart $::testfile
runto_main
diff --git a/gdb/testsuite/gdb.threads/break-while-running.c b/gdb/testsuite/gdb.threads/break-while-running.c
index 1483880..ad64f89 100644
--- a/gdb/testsuite/gdb.threads/break-while-running.c
+++ b/gdb/testsuite/gdb.threads/break-while-running.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2014-2024 Free Software Foundation, Inc.
+ Copyright 2014-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/break-while-running.exp b/gdb/testsuite/gdb.threads/break-while-running.exp
index 4bec753..fb7994d 100644
--- a/gdb/testsuite/gdb.threads/break-while-running.exp
+++ b/gdb/testsuite/gdb.threads/break-while-running.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2024 Free Software Foundation, Inc.
+# Copyright (C) 2014-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -39,7 +39,7 @@ proc test { update_thread_list always_inserted non_stop } {
global gdb_prompt
global decimal
- clean_restart $binfile
+ clean_restart $::testfile
gdb_test_no_output "set non-stop $non_stop"
gdb_test_no_output "set breakpoint always-inserted $always_inserted"
diff --git a/gdb/testsuite/gdb.threads/check-libthread-db.c b/gdb/testsuite/gdb.threads/check-libthread-db.c
index 608b21c..1a353c4 100644
--- a/gdb/testsuite/gdb.threads/check-libthread-db.c
+++ b/gdb/testsuite/gdb.threads/check-libthread-db.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2017-2024 Free Software Foundation, Inc.
+ Copyright 2017-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/check-libthread-db.exp b/gdb/testsuite/gdb.threads/check-libthread-db.exp
index 6976fe6..6d63185 100644
--- a/gdb/testsuite/gdb.threads/check-libthread-db.exp
+++ b/gdb/testsuite/gdb.threads/check-libthread-db.exp
@@ -1,4 +1,4 @@
-# Copyright 2017-2024 Free Software Foundation, Inc.
+# Copyright 2017-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -40,7 +40,7 @@ set initial_thread_re "($thread_re1|$thread_re2)"
with_test_prefix "user-initiated check" {
# User-initiated check with libthread_db not loaded.
- clean_restart ${binfile}
+ clean_restart ${::testfile}
gdb_test "maint show check-libthread-db" \
"Whether to check libthread_db at load time is off."
@@ -85,7 +85,7 @@ with_test_prefix "automated load-time check" {
# Automated load-time check with NPTL possibly uninitialized.
with_test_prefix "libpthread.so possibly not initialized" {
- clean_restart ${binfile}
+ clean_restart ${::testfile}
gdb_test_no_output "maint set check-libthread-db 1"
gdb_test_no_output "set debug libthread-db 1"
@@ -104,7 +104,7 @@ with_test_prefix "automated load-time check" {
# Automated load-time check with NPTL fully operational.
if { [can_spawn_for_attach] } {
with_test_prefix "libpthread.so fully initialized" {
- clean_restart ${binfile}
+ clean_restart ${::testfile}
gdb_test_no_output "maint set check-libthread-db 1"
gdb_test_no_output "set debug libthread-db 1"
diff --git a/gdb/testsuite/gdb.threads/clone-attach-detach.c b/gdb/testsuite/gdb.threads/clone-attach-detach.c
index b07f096..22af4c7 100644
--- a/gdb/testsuite/gdb.threads/clone-attach-detach.c
+++ b/gdb/testsuite/gdb.threads/clone-attach-detach.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2016-2024 Free Software Foundation, Inc.
+ Copyright 2016-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/clone-attach-detach.exp b/gdb/testsuite/gdb.threads/clone-attach-detach.exp
index de1f6a4..3da2c3e 100644
--- a/gdb/testsuite/gdb.threads/clone-attach-detach.exp
+++ b/gdb/testsuite/gdb.threads/clone-attach-detach.exp
@@ -1,6 +1,6 @@
# This testcase is part of GDB, the GNU debugger.
-# Copyright 2016-2024 Free Software Foundation, Inc.
+# Copyright 2016-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -74,7 +74,7 @@ set attempts 3
for {set attempt 1} {$attempt <= $attempts} {incr attempt} {
with_test_prefix "bg attach $attempt" {
- gdb_test "attach $testpid &" \
+ gdb_test -no-prompt-anchor "attach $testpid &" \
"Attaching to program.*process $testpid.*" \
"attach"
diff --git a/gdb/testsuite/gdb.threads/clone-new-thread-event.c b/gdb/testsuite/gdb.threads/clone-new-thread-event.c
index d2cc90b..53c1b24 100644
--- a/gdb/testsuite/gdb.threads/clone-new-thread-event.c
+++ b/gdb/testsuite/gdb.threads/clone-new-thread-event.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2009-2024 Free Software Foundation, Inc.
+ Copyright 2009-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/clone-new-thread-event.exp b/gdb/testsuite/gdb.threads/clone-new-thread-event.exp
index 55538c6..6b6b0a2 100644
--- a/gdb/testsuite/gdb.threads/clone-new-thread-event.exp
+++ b/gdb/testsuite/gdb.threads/clone-new-thread-event.exp
@@ -1,6 +1,6 @@
# This testcase is part of GDB, the GNU debugger.
-# Copyright 2012-2024 Free Software Foundation, Inc.
+# Copyright 2012-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/clone-thread_db.c b/gdb/testsuite/gdb.threads/clone-thread_db.c
index 50843de..1118554 100644
--- a/gdb/testsuite/gdb.threads/clone-thread_db.c
+++ b/gdb/testsuite/gdb.threads/clone-thread_db.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2015-2024 Free Software Foundation, Inc.
+ Copyright 2015-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/clone-thread_db.exp b/gdb/testsuite/gdb.threads/clone-thread_db.exp
index 24b744f..7ee233d 100644
--- a/gdb/testsuite/gdb.threads/clone-thread_db.exp
+++ b/gdb/testsuite/gdb.threads/clone-thread_db.exp
@@ -1,6 +1,6 @@
# This testcase is part of GDB, the GNU debugger.
-# Copyright 2015-2024 Free Software Foundation, Inc.
+# Copyright 2015-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/continue-pending-after-query.c b/gdb/testsuite/gdb.threads/continue-pending-after-query.c
index 41ec499..2bd09f6 100644
--- a/gdb/testsuite/gdb.threads/continue-pending-after-query.c
+++ b/gdb/testsuite/gdb.threads/continue-pending-after-query.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2013-2024 Free Software Foundation, Inc.
+ Copyright 2013-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/continue-pending-after-query.exp b/gdb/testsuite/gdb.threads/continue-pending-after-query.exp
index 7f2a60a..5069cd2 100644
--- a/gdb/testsuite/gdb.threads/continue-pending-after-query.exp
+++ b/gdb/testsuite/gdb.threads/continue-pending-after-query.exp
@@ -1,6 +1,6 @@
# This testcase is part of GDB, the GNU debugger.
#
-# Copyright 2013-2024 Free Software Foundation, Inc.
+# Copyright 2013-2025 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/continue-pending-status.c b/gdb/testsuite/gdb.threads/continue-pending-status.c
index cd35826..00f0a94 100644
--- a/gdb/testsuite/gdb.threads/continue-pending-status.c
+++ b/gdb/testsuite/gdb.threads/continue-pending-status.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2015-2024 Free Software Foundation, Inc.
+ Copyright 2015-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/continue-pending-status.exp b/gdb/testsuite/gdb.threads/continue-pending-status.exp
index 32da7ec..9cde85a 100644
--- a/gdb/testsuite/gdb.threads/continue-pending-status.exp
+++ b/gdb/testsuite/gdb.threads/continue-pending-status.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2024 Free Software Foundation, Inc.
+# Copyright (C) 2015-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/corethreads.c b/gdb/testsuite/gdb.threads/corethreads.c
index ef9946f..cb576bc 100644
--- a/gdb/testsuite/gdb.threads/corethreads.c
+++ b/gdb/testsuite/gdb.threads/corethreads.c
@@ -1,4 +1,4 @@
-/* Copyright 2011-2024 Free Software Foundation, Inc.
+/* Copyright 2011-2025 Free Software Foundation, Inc.
This file is part of GDB.
diff --git a/gdb/testsuite/gdb.threads/corethreads.exp b/gdb/testsuite/gdb.threads/corethreads.exp
index 4175948..0011dc3 100644
--- a/gdb/testsuite/gdb.threads/corethreads.exp
+++ b/gdb/testsuite/gdb.threads/corethreads.exp
@@ -1,4 +1,4 @@
-# Copyright 2011-2024 Free Software Foundation, Inc.
+# Copyright 2011-2025 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -29,6 +29,7 @@ if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executa
set corefile [core_find $binfile]
if {$corefile == ""} {
+ untested "unable to create or find corefile"
return 0
}
diff --git a/gdb/testsuite/gdb.threads/create-fail.c b/gdb/testsuite/gdb.threads/create-fail.c
index e4cd27e..e7976b1 100644
--- a/gdb/testsuite/gdb.threads/create-fail.c
+++ b/gdb/testsuite/gdb.threads/create-fail.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2012-2024 Free Software Foundation, Inc.
+ Copyright 2012-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/create-fail.exp b/gdb/testsuite/gdb.threads/create-fail.exp
index 908f095..14f3f4b 100644
--- a/gdb/testsuite/gdb.threads/create-fail.exp
+++ b/gdb/testsuite/gdb.threads/create-fail.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2024 Free Software Foundation, Inc.
+# Copyright (C) 2012-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/current-lwp-dead.c b/gdb/testsuite/gdb.threads/current-lwp-dead.c
index 4aa15a2..e2d149d 100644
--- a/gdb/testsuite/gdb.threads/current-lwp-dead.c
+++ b/gdb/testsuite/gdb.threads/current-lwp-dead.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2009-2024 Free Software Foundation, Inc.
+ Copyright 2009-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/current-lwp-dead.exp b/gdb/testsuite/gdb.threads/current-lwp-dead.exp
index 9951994..c8364df 100644
--- a/gdb/testsuite/gdb.threads/current-lwp-dead.exp
+++ b/gdb/testsuite/gdb.threads/current-lwp-dead.exp
@@ -1,6 +1,6 @@
# This testcase is part of GDB, the GNU debugger.
-# Copyright 2009-2024 Free Software Foundation, Inc.
+# Copyright 2009-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -47,6 +47,6 @@ gdb_breakpoint $line
gdb_continue_to_breakpoint "fn_return" ".*at-fn_return.*"
# Confirm thread 2 is really gone.
-gdb_test "info threads 2" "No threads match '2'\\."
+gdb_test "info threads 2" "No threads matched\\."
gdb_continue_to_end "" continue 1
diff --git a/gdb/testsuite/gdb.threads/del-pending-thread-bp-lib.c b/gdb/testsuite/gdb.threads/del-pending-thread-bp-lib.c
index 15d1b98..d34a103 100644
--- a/gdb/testsuite/gdb.threads/del-pending-thread-bp-lib.c
+++ b/gdb/testsuite/gdb.threads/del-pending-thread-bp-lib.c
@@ -1,4 +1,4 @@
-/* Copyright 2023 Free Software Foundation, Inc.
+/* Copyright 2023-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/del-pending-thread-bp.c b/gdb/testsuite/gdb.threads/del-pending-thread-bp.c
index 6fc76db..85b3db5 100644
--- a/gdb/testsuite/gdb.threads/del-pending-thread-bp.c
+++ b/gdb/testsuite/gdb.threads/del-pending-thread-bp.c
@@ -1,4 +1,4 @@
-/* Copyright 2023 Free Software Foundation, Inc.
+/* Copyright 2023-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/del-pending-thread-bp.exp b/gdb/testsuite/gdb.threads/del-pending-thread-bp.exp
index 14a91a4..1fbfc40 100644
--- a/gdb/testsuite/gdb.threads/del-pending-thread-bp.exp
+++ b/gdb/testsuite/gdb.threads/del-pending-thread-bp.exp
@@ -1,4 +1,4 @@
-# Copyright 2023 Free Software Foundation, Inc.
+# Copyright 2023-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/detach-step-over.c b/gdb/testsuite/gdb.threads/detach-step-over.c
index 17fcd50..5559ce1 100644
--- a/gdb/testsuite/gdb.threads/detach-step-over.c
+++ b/gdb/testsuite/gdb.threads/detach-step-over.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2021-2024 Free Software Foundation, Inc.
+ Copyright 2021-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/detach-step-over.exp b/gdb/testsuite/gdb.threads/detach-step-over.exp
index ddaad34..1767464 100644
--- a/gdb/testsuite/gdb.threads/detach-step-over.exp
+++ b/gdb/testsuite/gdb.threads/detach-step-over.exp
@@ -1,4 +1,4 @@
-# Copyright 2021-2024 Free Software Foundation, Inc.
+# Copyright 2021-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -50,6 +50,8 @@
require can_spawn_for_attach
+require allow_multi_inferior_tests
+
standard_testfile
set bp_lineno [gdb_get_line_number "Set breakpoint here"]
@@ -64,7 +66,7 @@ proc start_gdb_for_test {condition_eval target_non_stop non_stop displaced} {
append ::GDBFLAGS " -ex \"set non-stop $non_stop\""
append ::GDBFLAGS " -ex \"set displaced $displaced\""
append ::GDBFLAGS " -ex \"set schedule-multiple on\""
- clean_restart $::binfile
+ clean_restart $::testfile
}
gdb_test_no_output "set breakpoint condition-evaluation $condition_eval"
diff --git a/gdb/testsuite/gdb.threads/dlopen-libpthread-lib.c b/gdb/testsuite/gdb.threads/dlopen-libpthread-lib.c
index be6f18e..c17a152 100644
--- a/gdb/testsuite/gdb.threads/dlopen-libpthread-lib.c
+++ b/gdb/testsuite/gdb.threads/dlopen-libpthread-lib.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2011-2024 Free Software Foundation, Inc.
+ Copyright 2011-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/dlopen-libpthread.c b/gdb/testsuite/gdb.threads/dlopen-libpthread.c
index 0475ac7..aa724e7 100644
--- a/gdb/testsuite/gdb.threads/dlopen-libpthread.c
+++ b/gdb/testsuite/gdb.threads/dlopen-libpthread.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2011-2024 Free Software Foundation, Inc.
+ Copyright 2011-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/dlopen-libpthread.exp b/gdb/testsuite/gdb.threads/dlopen-libpthread.exp
index 0343f7e..13a2532 100644
--- a/gdb/testsuite/gdb.threads/dlopen-libpthread.exp
+++ b/gdb/testsuite/gdb.threads/dlopen-libpthread.exp
@@ -1,4 +1,4 @@
-# Copyright 2011-2024 Free Software Foundation, Inc.
+# Copyright 2011-2025 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/execl.c b/gdb/testsuite/gdb.threads/execl.c
index 7880041..86a065c 100644
--- a/gdb/testsuite/gdb.threads/execl.c
+++ b/gdb/testsuite/gdb.threads/execl.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2008-2024 Free Software Foundation, Inc.
+ Copyright 2008-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/execl.exp b/gdb/testsuite/gdb.threads/execl.exp
index 194438b..a42dce9 100644
--- a/gdb/testsuite/gdb.threads/execl.exp
+++ b/gdb/testsuite/gdb.threads/execl.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2024 Free Software Foundation, Inc.
+# Copyright (C) 2008-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@ if {[gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile1}" executable {deb
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
if { [is_remote target] } {
gdb_remote_download target $binfile1
}
diff --git a/gdb/testsuite/gdb.threads/execl1.c b/gdb/testsuite/gdb.threads/execl1.c
index 553923b..5177ac0 100644
--- a/gdb/testsuite/gdb.threads/execl1.c
+++ b/gdb/testsuite/gdb.threads/execl1.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2008-2024 Free Software Foundation, Inc.
+ Copyright 2008-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/foll-fork-other-thread.c b/gdb/testsuite/gdb.threads/foll-fork-other-thread.c
index bd8617a..6213cd8 100644
--- a/gdb/testsuite/gdb.threads/foll-fork-other-thread.c
+++ b/gdb/testsuite/gdb.threads/foll-fork-other-thread.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2022-2024 Free Software Foundation, Inc.
+ Copyright 2022-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/foll-fork-other-thread.exp b/gdb/testsuite/gdb.threads/foll-fork-other-thread.exp
index 3c6a056..29ec34c 100644
--- a/gdb/testsuite/gdb.threads/foll-fork-other-thread.exp
+++ b/gdb/testsuite/gdb.threads/foll-fork-other-thread.exp
@@ -1,4 +1,4 @@
-# Copyright 2022-2024 Free Software Foundation, Inc.
+# Copyright 2022-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,6 +17,8 @@
# another thread, in different combinations of "set follow-fork
# parent/child", and other execution modes.
+require allow_fork_tests
+
standard_testfile
# Line where to stop the main thread.
@@ -44,7 +46,7 @@ proc do_test { fork_func follow target-non-stop non-stop displaced-stepping } {
save_vars { ::GDBFLAGS } {
append ::GDBFLAGS " -ex \"maintenance set target-non-stop ${target-non-stop}\""
append ::GDBFLAGS " -ex \"set non-stop ${non-stop}\""
- clean_restart ${::binfile}-${fork_func}
+ clean_restart ${::testfile}-${fork_func}
}
gdb_test_no_output "set displaced-stepping ${displaced-stepping}"
diff --git a/gdb/testsuite/gdb.threads/fork-child-threads.c b/gdb/testsuite/gdb.threads/fork-child-threads.c
index 7e55e9c..209ba7f 100644
--- a/gdb/testsuite/gdb.threads/fork-child-threads.c
+++ b/gdb/testsuite/gdb.threads/fork-child-threads.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2008-2024 Free Software Foundation, Inc.
+ Copyright 2008-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/fork-child-threads.exp b/gdb/testsuite/gdb.threads/fork-child-threads.exp
index 8f13970..d1b413c 100644
--- a/gdb/testsuite/gdb.threads/fork-child-threads.exp
+++ b/gdb/testsuite/gdb.threads/fork-child-threads.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2024 Free Software Foundation, Inc.
+# Copyright (C) 2008-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -13,10 +13,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Only GNU/Linux is known to support `set follow-fork-mode child'.
-if { ! [istarget "*-*-linux*"] } {
- return 0
-}
+require allow_fork_tests
standard_testfile
@@ -24,7 +21,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
if {![runto_main]} {
return 0
diff --git a/gdb/testsuite/gdb.threads/fork-plus-threads.c b/gdb/testsuite/gdb.threads/fork-plus-threads.c
index 4e3e9d4..f12c936 100644
--- a/gdb/testsuite/gdb.threads/fork-plus-threads.c
+++ b/gdb/testsuite/gdb.threads/fork-plus-threads.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2015-2024 Free Software Foundation, Inc.
+ Copyright 2015-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/fork-plus-threads.exp b/gdb/testsuite/gdb.threads/fork-plus-threads.exp
index c08b4c1..4ce88d3 100644
--- a/gdb/testsuite/gdb.threads/fork-plus-threads.exp
+++ b/gdb/testsuite/gdb.threads/fork-plus-threads.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2024 Free Software Foundation, Inc.
+# Copyright (C) 2015-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,6 +20,8 @@
#
# See https://sourceware.org/bugzilla/show_bug.cgi?id=18600
+require allow_fork_tests
+
# In remote mode, we cannot continue debugging after all
# inferiors have terminated, and this test requires that.
if { [target_info exists gdb_protocol]
diff --git a/gdb/testsuite/gdb.threads/fork-thread-pending.c b/gdb/testsuite/gdb.threads/fork-thread-pending.c
index a9b557a..99bd821 100644
--- a/gdb/testsuite/gdb.threads/fork-thread-pending.c
+++ b/gdb/testsuite/gdb.threads/fork-thread-pending.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2008-2024 Free Software Foundation, Inc.
+ Copyright 2008-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/fork-thread-pending.exp b/gdb/testsuite/gdb.threads/fork-thread-pending.exp
index d31a347..e0e3625 100644
--- a/gdb/testsuite/gdb.threads/fork-thread-pending.exp
+++ b/gdb/testsuite/gdb.threads/fork-thread-pending.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2024 Free Software Foundation, Inc.
+# Copyright (C) 2009-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -13,11 +13,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Only GNU/Linux is known to support `set follow-fork-mode child'.
-#
-if { ! [istarget "*-*-linux*"] } {
- return 0
-}
+require allow_fork_tests
standard_testfile
@@ -25,7 +21,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
if {![runto_main]} {
return 0
@@ -79,7 +75,7 @@ gdb_test_multiple "info threads" "$test" {
# Start over, but this time, don't switch away from the fork event thread.
-clean_restart $binfile
+clean_restart $::testfile
if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.c b/gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.c
index aaee143..9926b6f 100644
--- a/gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.c
+++ b/gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2015-2024 Free Software Foundation, Inc.
+ Copyright 2015-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.exp b/gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.exp
index 66311fe..d65fe83d 100644
--- a/gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.exp
+++ b/gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2024 Free Software Foundation, Inc.
+# Copyright (C) 2015-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,6 +16,8 @@
# This test verifies that several threads forking while another thread
# is constantly stepping over a breakpoint is properly handled.
+require allow_fork_tests
+
standard_testfile
set linenum [gdb_get_line_number "set break here"]
@@ -35,7 +37,7 @@ proc probe_displaced_stepping_support {} {
global binfile gdb_prompt
with_test_prefix "probe displaced-stepping support" {
- clean_restart $binfile
+ clean_restart $::testfile
gdb_test_no_output "set displaced on"
if {![runto_main]} {
@@ -74,7 +76,7 @@ proc do_test { cond_bp_target detach_on_fork displaced } {
save_vars { GDBFLAGS } {
set GDBFLAGS [concat $GDBFLAGS " -ex \"set non-stop on\""]
- clean_restart $binfile
+ clean_restart $::testfile
}
if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.threads/gcore-stale-thread.c b/gdb/testsuite/gdb.threads/gcore-stale-thread.c
index ca5538c..39b23c7 100644
--- a/gdb/testsuite/gdb.threads/gcore-stale-thread.c
+++ b/gdb/testsuite/gdb.threads/gcore-stale-thread.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2014-2024 Free Software Foundation, Inc.
+ Copyright 2014-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/gcore-stale-thread.exp b/gdb/testsuite/gdb.threads/gcore-stale-thread.exp
index 2f41982..396ea29 100644
--- a/gdb/testsuite/gdb.threads/gcore-stale-thread.exp
+++ b/gdb/testsuite/gdb.threads/gcore-stale-thread.exp
@@ -1,4 +1,4 @@
-# Copyright 2014-2024 Free Software Foundation, Inc.
+# Copyright 2014-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/gcore-thread.exp b/gdb/testsuite/gdb.threads/gcore-thread.exp
index f4572c4..4e00f80 100644
--- a/gdb/testsuite/gdb.threads/gcore-thread.exp
+++ b/gdb/testsuite/gdb.threads/gcore-thread.exp
@@ -1,4 +1,4 @@
-# Copyright 2002-2024 Free Software Foundation, Inc.
+# Copyright 2002-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/hand-call-in-threads.c b/gdb/testsuite/gdb.threads/hand-call-in-threads.c
index 777e4fb..2b98964 100644
--- a/gdb/testsuite/gdb.threads/hand-call-in-threads.c
+++ b/gdb/testsuite/gdb.threads/hand-call-in-threads.c
@@ -1,6 +1,6 @@
/* Test case for hand function calls in multi-threaded program.
- Copyright 2008-2024 Free Software Foundation, Inc.
+ Copyright 2008-2025 Free Software Foundation, Inc.
This file is part of GDB.
diff --git a/gdb/testsuite/gdb.threads/hand-call-in-threads.exp b/gdb/testsuite/gdb.threads/hand-call-in-threads.exp
index cde2b2d..fd934f5 100644
--- a/gdb/testsuite/gdb.threads/hand-call-in-threads.exp
+++ b/gdb/testsuite/gdb.threads/hand-call-in-threads.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2024 Free Software Foundation, Inc.
+# Copyright (C) 2004-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -44,7 +44,7 @@ proc get_dummy_frame_number { } {
return ""
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
if { ![runto_main] } {
return 0
diff --git a/gdb/testsuite/gdb.threads/hand-call-new-thread.c b/gdb/testsuite/gdb.threads/hand-call-new-thread.c
index e475b9b..ed2d7ef 100644
--- a/gdb/testsuite/gdb.threads/hand-call-new-thread.c
+++ b/gdb/testsuite/gdb.threads/hand-call-new-thread.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2015-2024 Free Software Foundation, Inc.
+ Copyright 2015-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/hand-call-new-thread.exp b/gdb/testsuite/gdb.threads/hand-call-new-thread.exp
index 89492f4..6b859ff 100644
--- a/gdb/testsuite/gdb.threads/hand-call-new-thread.exp
+++ b/gdb/testsuite/gdb.threads/hand-call-new-thread.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2024 Free Software Foundation, Inc.
+# Copyright (C) 2015-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/ia64-sigill.c b/gdb/testsuite/gdb.threads/ia64-sigill.c
index 183f376..366e0fd 100644
--- a/gdb/testsuite/gdb.threads/ia64-sigill.c
+++ b/gdb/testsuite/gdb.threads/ia64-sigill.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2010-2024 Free Software Foundation, Inc.
+ Copyright 2010-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/ia64-sigill.exp b/gdb/testsuite/gdb.threads/ia64-sigill.exp
index 79233ee..ac6ff20 100644
--- a/gdb/testsuite/gdb.threads/ia64-sigill.exp
+++ b/gdb/testsuite/gdb.threads/ia64-sigill.exp
@@ -1,6 +1,6 @@
# This testcase is part of GDB, the GNU debugger.
-# Copyright 2010-2024 Free Software Foundation, Inc.
+# Copyright 2010-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/inf-thr-count.c b/gdb/testsuite/gdb.threads/inf-thr-count.c
index 055ad7e..e3abea3 100644
--- a/gdb/testsuite/gdb.threads/inf-thr-count.c
+++ b/gdb/testsuite/gdb.threads/inf-thr-count.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2023-2024 Free Software Foundation, Inc.
+ Copyright 2023-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/inf-thr-count.exp b/gdb/testsuite/gdb.threads/inf-thr-count.exp
index 1c85c95..5272f5c 100644
--- a/gdb/testsuite/gdb.threads/inf-thr-count.exp
+++ b/gdb/testsuite/gdb.threads/inf-thr-count.exp
@@ -1,4 +1,4 @@
-# Copyright 2023-2024 Free Software Foundation, Inc.
+# Copyright 2023-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -43,8 +43,8 @@ if {[build_executable "failed to prepare" $testfile $srcfile \
# Start GDB. Ensure we are in non-stop mode as we need to read from
# the inferior while it is running.
save_vars {GDBFLAGS} {
- append GDBFLAGS " -ex \"set non-stop on\""
- clean_restart $binfile
+ append GDBFLAGS { -ex "set non-stop on"}
+ clean_restart $::testfile
}
if ![runto_main] {
@@ -54,22 +54,20 @@ if ![runto_main] {
gdb_breakpoint breakpt
gdb_continue_to_breakpoint "first breakpt call"
+set re_var [string_to_regexp "$"]$decimal
+
# Check we can see a single thread to begin with.
-gdb_test "p \$_inferior_thread_count" \
- "^\\\$$::decimal = 1" \
- "only one thread in \$_inferior_thread_count"
+gdb_test {p $_inferior_thread_count} \
+ "^$re_var = 1" \
+ {only one thread in $_inferior_thread_count}
# We don't want thread events, it makes it harder to match GDB's
# output.
gdb_test_no_output "set print thread-events off"
# Continue the program in the background.
-set test "continue&"
-gdb_test_multiple "continue&" $test {
- -re "Continuing\\.\r\n$gdb_prompt " {
- pass $test
- }
-}
+gdb_test -no-prompt-anchor "continue&" \
+ [string_to_regexp "Continuing."]
# Read the 'stage' flag from the inferior. This is initially 0, but
# will be set to 1 once the extra thread has been created, and then 2
@@ -88,8 +86,17 @@ proc wait_for_stage { num } {
set failure_count 0
set cmd "print /d stage"
set stage_flag 0
+
+ set re_int -?$::decimal
+
+ set re_msg \
+ [multi_line \
+ "Cannot execute this command while the target is running" \
+ {Use the "interrupt" command to stop the target} \
+ [string_to_regexp "and then try again."]]
+
gdb_test_multiple "$cmd" "wait for 'stage' flag to be $num" {
- -re -wrap "^Cannot execute this command while the target is running\\.\r\nUse the \"interrupt\" command to stop the target\r\nand then try again\\." {
+ -re -wrap ^$re_msg {
fail "$gdb_test_name (can't read asynchronously)"
gdb_test_no_output "interrupt"
@@ -101,7 +108,7 @@ proc wait_for_stage { num } {
}
}
- -re -wrap "^\\$\[0-9\]* = (\[-\]*\[0-9\]*).*" {
+ -re -wrap "^$::re_var = ($re_int).*" {
set stage_flag $expect_out(1,string)
if {$stage_flag != $num} {
set stage_flag 0
@@ -131,8 +138,8 @@ if {![wait_for_stage 1]} {
if {[target_info exists gdb_protocol]
&& ([target_info gdb_protocol] == "remote"
|| [target_info gdb_protocol] == "extended-remote")} {
- set new_thread_re "\\\[New Thread \[^\r\n\]+\\\]\r\n"
- set exit_thread_re "\\\[Thread \[^\r\n\]+ exited\\\]\r\n"
+ set new_thread_re {\[New Thread [^\r\n]+\]\r\n}
+ set exit_thread_re {\[Thread [^\r\n]+ exited\]\r\n}
} else {
set new_thread_re ""
set exit_thread_re ""
@@ -141,9 +148,9 @@ if {[target_info exists gdb_protocol]
# This is the test we actually care about. Check that the
# $_inferior_thread_count convenience variable shows the correct
# thread count; the new thread should be visible.
-gdb_test "with print thread-events on -- p \$_inferior_thread_count" \
- "^${new_thread_re}\\\$$::decimal = 2" \
- "second thread visible in \$_inferior_thread_count"
+gdb_test {with print thread-events on -- p $_inferior_thread_count} \
+ "^${new_thread_re}$re_var = 2" \
+ {second thread visible in $_inferior_thread_count}
# Set a variable in the inferior, this will cause the second thread to
# exit.
@@ -157,19 +164,25 @@ if {![wait_for_stage 2]} {
}
# Check that the second thread has gone away.
-gdb_test "with print thread-events on -- p \$_inferior_thread_count" \
- "^${exit_thread_re}\\\$$::decimal = 1" \
- "back to one thread visible in \$_inferior_thread_count"
+gdb_test {with print thread-events on -- p $_inferior_thread_count} \
+ "^${exit_thread_re}$re_var = 1" \
+ {back to one thread visible in $_inferior_thread_count}
# Set a variable in the inferior, this will cause the second thread to
# exit.
-gdb_test_no_output "set variable spin = 0" \
+gdb_test_no_output -no-prompt-anchor "set variable spin = 0" \
"set 'spin' flag to allow main thread to exit"
# When the second thread exits, the main thread joins with it, and
# then proceeds to hit the breakpt function again.
+set re_breakpt [string_to_regexp "breakpt ()"]
+set re \
+ [multi_line \
+ "Thread 1 \[^\r\n\]+ hit Breakpoint $decimal, $re_breakpt\[^\r\n\]+" \
+ "\[^\r\n\]+" \
+ ""]
gdb_test_multiple "" "wait for main thread to stop" {
- -re "Thread 1 \[^\r\n\]+ hit Breakpoint $decimal, breakpt \\(\\)\[^\r\n\]+\r\n\[^\r\n\]+\r\n" {
+ -re $re {
pass $gdb_test_name
}
}
diff --git a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-other-thread-event.c b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-other-thread-event.c
index 38a5bc2..d954fa2 100644
--- a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-other-thread-event.c
+++ b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-other-thread-event.c
@@ -1,4 +1,4 @@
-/* Copyright 2022-2024 Free Software Foundation, Inc.
+/* Copyright 2022-2025 Free Software Foundation, Inc.
This file is part of GDB.
diff --git a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-other-thread-event.exp b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-other-thread-event.exp
index b5c0d84..35a1fe5 100644
--- a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-other-thread-event.exp
+++ b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-other-thread-event.exp
@@ -1,4 +1,4 @@
-# Copyright 2022-2024 Free Software Foundation, Inc.
+# Copyright 2022-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -53,7 +53,7 @@ proc start_gdb_and_runto_main { target_async target_non_stop } {
append ::GDBFLAGS \
" -ex \"maintenance set target-async ${target_async}\""
- clean_restart ${::binfile}
+ clean_restart ${::testfile}
}
if { ![runto_main] } {
diff --git a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.c b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.c
index d0707cd..52921cd 100644
--- a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.c
+++ b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.c
@@ -1,4 +1,4 @@
-/* Copyright 2022-2024 Free Software Foundation, Inc.
+/* Copyright 2022-2025 Free Software Foundation, Inc.
This file is part of GDB.
diff --git a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp
index feec37b..ed98998 100644
--- a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp
+++ b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp
@@ -1,4 +1,4 @@
-# Copyright 2022-2024 Free Software Foundation, Inc.
+# Copyright 2022-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -42,7 +42,7 @@ proc start_gdb_and_runto_main { target_async target_non_stop } {
append ::GDBFLAGS \
" -ex \"maintenance set target-async ${target_async}\""
- clean_restart ${::binfile}
+ clean_restart ${::testfile}
}
if { ![runto_main] } {
@@ -141,6 +141,8 @@ proc_with_prefix run_kill_and_restart_test { target_async target_non_stop } {
gdb_start_cmd
}
+set re_thread_exited {\[Thread [^\r\n]+ exited\]}
+
# Create a conditional breakpoint which includes a call to a function that
# segfaults. Run GDB and check what happens when the inferior segfaults
# during the inferior call.
@@ -176,7 +178,8 @@ proc_with_prefix run_bp_cond_segfaults { target_async target_non_stop } {
"To change this behavior use \"set unwind-on-signal on\"\\." \
"Evaluation of the expression containing the function" \
"\\(function_that_segfaults\\) will be abandoned\\." \
- "When the function is done executing, GDB will silently stop\\."]
+ "When the function is done executing, GDB will silently stop\\.(" \
+ "$::re_thread_exited)?"]
}
# Create a conditional breakpoint which includes a call to a function that
@@ -210,7 +213,8 @@ proc_with_prefix run_bp_cond_hits_breakpoint { target_async target_non_stop } {
"The program being debugged stopped while in a function called from GDB\\." \
"Evaluation of the expression containing the function" \
"\\(function_with_breakpoint\\) will be abandoned\\." \
- "When the function is done executing, GDB will silently stop\\."]
+ "When the function is done executing, GDB will silently stop\\.(" \
+ "$::re_thread_exited)?"]
}
foreach_with_prefix target_async { "on" "off" } {
diff --git a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-single.c b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-single.c
index 0b045f8..b26a63d 100644
--- a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-single.c
+++ b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-single.c
@@ -1,4 +1,4 @@
-/* Copyright 2022-2024 Free Software Foundation, Inc.
+/* Copyright 2022-2025 Free Software Foundation, Inc.
This file is part of GDB.
diff --git a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-single.exp b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-single.exp
index 2c3623e..bc12fb4 100644
--- a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-single.exp
+++ b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-single.exp
@@ -1,4 +1,4 @@
-# Copyright 2022-2024 Free Software Foundation, Inc.
+# Copyright 2022-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -38,7 +38,7 @@ proc start_gdb_and_runto_main { target_async target_non_stop } {
append ::GDBFLAGS \
" -ex \"maintenance set target-async ${target_async}\""
- clean_restart ${::binfile}
+ clean_restart ${::testfile}
}
if { ![runto_main] } {
diff --git a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-timeout.c b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-timeout.c
index 415eaea..a5fb3c2 100644
--- a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-timeout.c
+++ b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-timeout.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2022-2024 Free Software Foundation, Inc.
+ Copyright 2022-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-timeout.exp b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-timeout.exp
index 8f17f13..03c6959 100644
--- a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-timeout.exp
+++ b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-timeout.exp
@@ -1,4 +1,4 @@
-# Copyright 2022-2024 Free Software Foundation, Inc.
+# Copyright 2022-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -52,7 +52,7 @@ proc run_test { target_async target_non_stop non_stop other_thread_bp unwind } {
append ::GDBFLAGS " -ex \"maint non-stop $non_stop\""
append ::GDBFLAGS " -ex \"maintenance set target-async ${target_async}\""
- clean_restart ${::binfile}
+ clean_restart ${::testfile}
}
if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.threads/infcall-thread-announce.c b/gdb/testsuite/gdb.threads/infcall-thread-announce.c
index 90bf95e..ca39cf0 100644
--- a/gdb/testsuite/gdb.threads/infcall-thread-announce.c
+++ b/gdb/testsuite/gdb.threads/infcall-thread-announce.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2023-2024 Free Software Foundation, Inc.
+ Copyright 2023-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/infcall-thread-announce.exp b/gdb/testsuite/gdb.threads/infcall-thread-announce.exp
index e22245e..68fd7b7 100644
--- a/gdb/testsuite/gdb.threads/infcall-thread-announce.exp
+++ b/gdb/testsuite/gdb.threads/infcall-thread-announce.exp
@@ -1,4 +1,4 @@
-# Copyright 2023-2024 Free Software Foundation, Inc.
+# Copyright 2023-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/info-threads-cur-sal-2.c b/gdb/testsuite/gdb.threads/info-threads-cur-sal-2.c
index 20b0f45..1306a05 100644
--- a/gdb/testsuite/gdb.threads/info-threads-cur-sal-2.c
+++ b/gdb/testsuite/gdb.threads/info-threads-cur-sal-2.c
@@ -1,4 +1,4 @@
-/* Copyright 2013-2024 Free Software Foundation, Inc.
+/* Copyright 2013-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/info-threads-cur-sal.c b/gdb/testsuite/gdb.threads/info-threads-cur-sal.c
index 787fb53..cb75325 100644
--- a/gdb/testsuite/gdb.threads/info-threads-cur-sal.c
+++ b/gdb/testsuite/gdb.threads/info-threads-cur-sal.c
@@ -1,4 +1,4 @@
-/* Copyright 2007-2024 Free Software Foundation, Inc.
+/* Copyright 2007-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/info-threads-cur-sal.exp b/gdb/testsuite/gdb.threads/info-threads-cur-sal.exp
index 664c962..2d57136 100644
--- a/gdb/testsuite/gdb.threads/info-threads-cur-sal.exp
+++ b/gdb/testsuite/gdb.threads/info-threads-cur-sal.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2024 Free Software Foundation, Inc.
+# Copyright (C) 2013-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/info-threads-options.c b/gdb/testsuite/gdb.threads/info-threads-options.c
new file mode 100644
index 0000000..2c4cd85
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/info-threads-options.c
@@ -0,0 +1,77 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2022-2025 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <pthread.h>
+
+#define NUM 4
+
+static pthread_barrier_t threads_started_barrier;
+
+static void
+stop_here ()
+{
+}
+
+static void
+spin ()
+{
+ while (1)
+ usleep (1);
+}
+
+static void *
+work (void *arg)
+{
+ int id = *(int *) arg;
+
+ pthread_barrier_wait (&threads_started_barrier);
+
+ if (id % 2 == 0)
+ stop_here ();
+ else
+ spin ();
+
+ pthread_exit (NULL);
+}
+
+int
+main ()
+{
+ /* Ensure we stop if GDB crashes and DejaGNU fails to kill us. */
+ alarm (10);
+
+ pthread_t threads[NUM];
+ int ids[NUM];
+
+ pthread_barrier_init (&threads_started_barrier, NULL, NUM + 1);
+
+ for (int i = 0; i < NUM; i++)
+ {
+ ids[i] = i;
+ pthread_create (&threads[i], NULL, work, &ids[i]);
+ }
+
+ /* Wait until all threads are seen running. */
+ pthread_barrier_wait (&threads_started_barrier);
+
+ stop_here ();
+
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.threads/info-threads-options.exp b/gdb/testsuite/gdb.threads/info-threads-options.exp
new file mode 100644
index 0000000..e6c68e2
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/info-threads-options.exp
@@ -0,0 +1,131 @@
+# Copyright (C) 2022-2025 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test the filter flags of the "info threads" command.
+
+standard_testfile
+
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
+ executable debug] != "" } {
+ return -1
+}
+
+save_vars { GDBFLAGS } {
+ append GDBFLAGS " -ex \"set non-stop on\""
+ clean_restart $::testfile
+}
+
+if ![runto_main] {
+ return -1
+}
+
+gdb_breakpoint "stop_here"
+gdb_test_multiple "continue -a&" "" {
+ -re "Continuing.\r\n$gdb_prompt " {
+ pass $gdb_test_name
+ }
+}
+
+set expected_hits 3
+set fill "\[^\r\n\]+"
+set num_hits 0
+gdb_test_multiple "" "hit the breakpoint" -lbl {
+ -re "\r\nThread ${fill} hit Breakpoint ${decimal}," {
+ incr num_hits
+ if {$num_hits < $expected_hits} {
+ exp_continue
+ }
+ }
+}
+gdb_assert {$num_hits == $expected_hits} "expected threads hit the bp"
+
+# Count the number of running/stopped threads reported
+# by the "info threads" command. We also capture thread ids
+# for additional tests.
+set running_tid "invalid"
+set stopped_tid "invalid"
+
+set eol "(?=\r\n)"
+
+foreach_with_prefix flag {"" "-running" "-stopped" "-running -stopped"} {
+ set num_running 0
+ set num_stopped 0
+ gdb_test_multiple "info threads $flag" "info threads $flag" -lbl {
+ -re "Id${fill}Target Id${fill}Frame${fill}${eol}" {
+ exp_continue
+ }
+ -re "^\r\n. (${decimal})${fill}Thread ${fill}.running.${eol}" {
+ incr num_running
+ set running_tid $expect_out(1,string)
+ exp_continue
+ }
+ -re "^\r\n. (${decimal})${fill}Thread ${fill}stop_here ${fill}${eol}" {
+ incr num_stopped
+ set stopped_tid $expect_out(1,string)
+ exp_continue
+ }
+ -re "^\r\n$gdb_prompt $" {
+ pass $gdb_test_name
+ }
+ }
+
+ if {$flag eq "-running"} {
+ gdb_assert {$num_running == 2} "num running"
+ gdb_assert {$num_stopped == 0} "num stopped"
+ } elseif {$flag eq "-stopped"} {
+ gdb_assert {$num_running == 0} "num running"
+ gdb_assert {$num_stopped == 3} "num stopped"
+ } else {
+ gdb_assert {$num_running == 2} "num running"
+ gdb_assert {$num_stopped == 3} "num stopped"
+ }
+}
+
+verbose -log "running_tid=$running_tid, stopped_tid=$stopped_tid"
+
+# Test specifying thread ids.
+gdb_test "info threads -running $stopped_tid" \
+ "No threads matched\\." \
+ "info thread -running for a stopped thread"
+gdb_test "info threads -stopped $running_tid" \
+ "No threads matched\\." \
+ "info thread -stopped for a running thread"
+
+set ws "\[ \t\]+"
+foreach tid "\"$running_tid\" \"$running_tid $stopped_tid\"" {
+ gdb_test "info threads -running $tid" \
+ [multi_line \
+ "${ws}Id${ws}Target Id${ws}Frame${ws}" \
+ "${ws}${running_tid}${ws}Thread ${fill}.running."] \
+ "info thread -running with [llength $tid] thread ids"
+}
+
+foreach tid "\"$stopped_tid\" \"$stopped_tid $running_tid\"" {
+ gdb_test "info threads -stopped $tid" \
+ [multi_line \
+ "${ws}Id${ws}Target Id${ws}Frame${ws}" \
+ "${ws}${stopped_tid}${ws}Thread ${fill} stop_here ${fill}"] \
+ "info thread -stopped with [llength $tid] thread ids"
+}
+
+gdb_test_multiple "info threads -stopped -running $stopped_tid $running_tid" \
+ "filter flags and tids combined" {
+ -re -wrap ".*stop_here.*running.*" {
+ pass $gdb_test_name
+ }
+ -re -wrap ".*running.*stop_here.*" {
+ pass $gdb_test_name
+ }
+}
diff --git a/gdb/testsuite/gdb.threads/interrupt-while-step-over.c b/gdb/testsuite/gdb.threads/interrupt-while-step-over.c
index 172a95b..c89e84e 100644
--- a/gdb/testsuite/gdb.threads/interrupt-while-step-over.c
+++ b/gdb/testsuite/gdb.threads/interrupt-while-step-over.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2016-2024 Free Software Foundation, Inc.
+ Copyright 2016-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/interrupt-while-step-over.exp b/gdb/testsuite/gdb.threads/interrupt-while-step-over.exp
index 89c1d06..44e4d64 100644
--- a/gdb/testsuite/gdb.threads/interrupt-while-step-over.exp
+++ b/gdb/testsuite/gdb.threads/interrupt-while-step-over.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2016-2024 Free Software Foundation, Inc.
+# Copyright (C) 2016-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -169,7 +169,7 @@ proc testdriver {displaced} {
save_vars { GDBFLAGS } {
append GDBFLAGS " -ex \"set non-stop on\""
- clean_restart $binfile
+ clean_restart $::testfile
}
gdb_test_no_output "set displaced-stepping $displaced"
diff --git a/gdb/testsuite/gdb.threads/interrupted-hand-call.c b/gdb/testsuite/gdb.threads/interrupted-hand-call.c
index e6eae5e..fb6d140 100644
--- a/gdb/testsuite/gdb.threads/interrupted-hand-call.c
+++ b/gdb/testsuite/gdb.threads/interrupted-hand-call.c
@@ -1,6 +1,6 @@
/* Test case for hand function calls interrupted by a signal in another thread.
- Copyright 2008-2024 Free Software Foundation, Inc.
+ Copyright 2008-2025 Free Software Foundation, Inc.
This file is part of GDB.
diff --git a/gdb/testsuite/gdb.threads/interrupted-hand-call.exp b/gdb/testsuite/gdb.threads/interrupted-hand-call.exp
index 81221b4..15c48b1 100644
--- a/gdb/testsuite/gdb.threads/interrupted-hand-call.exp
+++ b/gdb/testsuite/gdb.threads/interrupted-hand-call.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2024 Free Software Foundation, Inc.
+# Copyright (C) 2004-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
if { ![runto_main] } {
return 0
diff --git a/gdb/testsuite/gdb.threads/kill.c b/gdb/testsuite/gdb.threads/kill.c
index 4003d81..5b60f14 100644
--- a/gdb/testsuite/gdb.threads/kill.c
+++ b/gdb/testsuite/gdb.threads/kill.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2014-2024 Free Software Foundation, Inc.
+ Copyright 2014-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/kill.exp b/gdb/testsuite/gdb.threads/kill.exp
index fa87ddc..3e6aa8b 100644
--- a/gdb/testsuite/gdb.threads/kill.exp
+++ b/gdb/testsuite/gdb.threads/kill.exp
@@ -1,6 +1,6 @@
# This testcase is part of GDB, the GNU debugger.
-# Copyright 2014-2024 Free Software Foundation, Inc.
+# Copyright 2014-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/killed-outside.c b/gdb/testsuite/gdb.threads/killed-outside.c
index 1ae88ff..6e5c2d4 100644
--- a/gdb/testsuite/gdb.threads/killed-outside.c
+++ b/gdb/testsuite/gdb.threads/killed-outside.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2020-2024 Free Software Foundation, Inc.
+ Copyright 2020-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/killed-outside.exp b/gdb/testsuite/gdb.threads/killed-outside.exp
index 35f7dc1..9edb8d2 100644
--- a/gdb/testsuite/gdb.threads/killed-outside.exp
+++ b/gdb/testsuite/gdb.threads/killed-outside.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2020-2024 Free Software Foundation, Inc.
+# Copyright (C) 2020-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/killed.c b/gdb/testsuite/gdb.threads/killed.c
index 928a7d4..5476a1d 100644
--- a/gdb/testsuite/gdb.threads/killed.c
+++ b/gdb/testsuite/gdb.threads/killed.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2002-2024 Free Software Foundation, Inc.
+ Copyright 2002-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/killed.exp b/gdb/testsuite/gdb.threads/killed.exp
index 0b89552..1fa83af 100644
--- a/gdb/testsuite/gdb.threads/killed.exp
+++ b/gdb/testsuite/gdb.threads/killed.exp
@@ -1,4 +1,4 @@
-# Copyright 2002-2024 Free Software Foundation, Inc.
+# Copyright 2002-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -62,7 +62,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
gdb_run_cmd
gdb_test "" "" "run program to completion"
diff --git a/gdb/testsuite/gdb.threads/leader-exit-attach.exp b/gdb/testsuite/gdb.threads/leader-exit-attach.exp
index 5334de2..2df4a18 100644
--- a/gdb/testsuite/gdb.threads/leader-exit-attach.exp
+++ b/gdb/testsuite/gdb.threads/leader-exit-attach.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2024 Free Software Foundation, Inc.
+# Copyright (C) 2024-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@ set testpid [spawn_id_get_pid $test_spawn_id]
# Wait a bit for the leader thread to exit, before attaching.
sleep 2
-clean_restart ${binfile}
+clean_restart ${::testfile}
# Save this early as we may not be able to talk with GDBserver anymore
# when we need to check it.
diff --git a/gdb/testsuite/gdb.threads/leader-exit.c b/gdb/testsuite/gdb.threads/leader-exit.c
index 333c53c..dbbb719 100644
--- a/gdb/testsuite/gdb.threads/leader-exit.c
+++ b/gdb/testsuite/gdb.threads/leader-exit.c
@@ -1,6 +1,6 @@
/* Clean exit of the thread group leader should not break GDB.
- Copyright 2007-2024 Free Software Foundation, Inc.
+ Copyright 2007-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/leader-exit.exp b/gdb/testsuite/gdb.threads/leader-exit.exp
index daddc15..1bc017b 100644
--- a/gdb/testsuite/gdb.threads/leader-exit.exp
+++ b/gdb/testsuite/gdb.threads/leader-exit.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2024 Free Software Foundation, Inc.
+# Copyright (C) 2007-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/linux-dp.exp b/gdb/testsuite/gdb.threads/linux-dp.exp
index de44ea5..35cc255 100644
--- a/gdb/testsuite/gdb.threads/linux-dp.exp
+++ b/gdb/testsuite/gdb.threads/linux-dp.exp
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Free Software Foundation, Inc.
+# Copyright 1999-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -44,7 +44,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
gdb_test_no_output "set print sevenbit-strings"
runto_main
diff --git a/gdb/testsuite/gdb.threads/local-watch-wrong-thread.c b/gdb/testsuite/gdb.threads/local-watch-wrong-thread.c
index 73bf88b..e623ec2 100644
--- a/gdb/testsuite/gdb.threads/local-watch-wrong-thread.c
+++ b/gdb/testsuite/gdb.threads/local-watch-wrong-thread.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2002-2024 Free Software Foundation, Inc.
+ Copyright 2002-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp b/gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp
index fcefb2b..a63f0be 100644
--- a/gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp
+++ b/gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp
@@ -1,6 +1,6 @@
# This testcase is part of GDB, the GNU debugger.
-# Copyright 2009-2024 Free Software Foundation, Inc.
+# Copyright 2009-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ if {[gdb_compile_pthreads \
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
gdb_test_no_output "set can-use-hw-watchpoints 1" ""
diff --git a/gdb/testsuite/gdb.threads/main-thread-exit-during-detach.c b/gdb/testsuite/gdb.threads/main-thread-exit-during-detach.c
index 50849d9..5981470 100644
--- a/gdb/testsuite/gdb.threads/main-thread-exit-during-detach.c
+++ b/gdb/testsuite/gdb.threads/main-thread-exit-during-detach.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2023-2024 Free Software Foundation, Inc.
+ Copyright 2023-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/main-thread-exit-during-detach.exp b/gdb/testsuite/gdb.threads/main-thread-exit-during-detach.exp
index 2a9320a..1ce0194 100644
--- a/gdb/testsuite/gdb.threads/main-thread-exit-during-detach.exp
+++ b/gdb/testsuite/gdb.threads/main-thread-exit-during-detach.exp
@@ -1,4 +1,4 @@
-# Copyright 2023-2024 Free Software Foundation, Inc.
+# Copyright 2023-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
@@ -50,7 +50,7 @@ if {[build_executable "failed to prepare" $testfile $srcfile \
proc run_test { spawn_inferior } {
save_vars { ::GDBFLAGS } {
append ::GDBFLAGS " -ex \"set non-stop on\""
- clean_restart $::binfile
+ clean_restart $::testfile
}
# Setup the inferior. When complete the main thread (#1) will
diff --git a/gdb/testsuite/gdb.threads/manythreads.c b/gdb/testsuite/gdb.threads/manythreads.c
index dd3c8a4..97a91de 100644
--- a/gdb/testsuite/gdb.threads/manythreads.c
+++ b/gdb/testsuite/gdb.threads/manythreads.c
@@ -1,5 +1,5 @@
/* Manythreads test program.
- Copyright 2004-2024 Free Software Foundation, Inc.
+ Copyright 2004-2025 Free Software Foundation, Inc.
Written by Jeff Johnston <jjohnstn@redhat.com>
Contributed by Red Hat
diff --git a/gdb/testsuite/gdb.threads/manythreads.exp b/gdb/testsuite/gdb.threads/manythreads.exp
index e660506..2cd296f 100644
--- a/gdb/testsuite/gdb.threads/manythreads.exp
+++ b/gdb/testsuite/gdb.threads/manythreads.exp
@@ -1,5 +1,5 @@
# manythreads.exp -- Expect script to test stopping many threads
-# Copyright (C) 2004-2024 Free Software Foundation, Inc.
+# Copyright (C) 2004-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
gdb_test_no_output "set print sevenbit-strings"
runto_main
diff --git a/gdb/testsuite/gdb.threads/multi-create-ns-info-thr.exp b/gdb/testsuite/gdb.threads/multi-create-ns-info-thr.exp
index 1c1eb89..1c3231c 100644
--- a/gdb/testsuite/gdb.threads/multi-create-ns-info-thr.exp
+++ b/gdb/testsuite/gdb.threads/multi-create-ns-info-thr.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2024 Free Software Foundation, Inc.
+# Copyright (C) 2007-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/multi-create.c b/gdb/testsuite/gdb.threads/multi-create.c
index 42fae3f..2706f37 100644
--- a/gdb/testsuite/gdb.threads/multi-create.c
+++ b/gdb/testsuite/gdb.threads/multi-create.c
@@ -1,5 +1,5 @@
/* Create threads from multiple threads in parallel.
- Copyright 2007-2024 Free Software Foundation, Inc.
+ Copyright 2007-2025 Free Software Foundation, Inc.
This file is part of GDB.
diff --git a/gdb/testsuite/gdb.threads/multi-create.exp b/gdb/testsuite/gdb.threads/multi-create.exp
index 49aa3a6..cb86aac 100644
--- a/gdb/testsuite/gdb.threads/multi-create.exp
+++ b/gdb/testsuite/gdb.threads/multi-create.exp
@@ -1,5 +1,5 @@
# multi-create.exp -- Test creating many threads in parallel
-# Copyright (C) 2007-2024 Free Software Foundation, Inc.
+# Copyright (C) 2007-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
runto_main
# Run to the beginning of create_function several times. Make sure
diff --git a/gdb/testsuite/gdb.threads/multiple-step-overs.c b/gdb/testsuite/gdb.threads/multiple-step-overs.c
index 424696a..694dd97 100644
--- a/gdb/testsuite/gdb.threads/multiple-step-overs.c
+++ b/gdb/testsuite/gdb.threads/multiple-step-overs.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2009-2024 Free Software Foundation, Inc.
+ Copyright 2009-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/multiple-step-overs.exp b/gdb/testsuite/gdb.threads/multiple-step-overs.exp
index dde874d..84eef1a 100644
--- a/gdb/testsuite/gdb.threads/multiple-step-overs.exp
+++ b/gdb/testsuite/gdb.threads/multiple-step-overs.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2024 Free Software Foundation, Inc.
+# Copyright (C) 2011-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/multiple-successive-infcall.c b/gdb/testsuite/gdb.threads/multiple-successive-infcall.c
index 7ba702a..38e1931 100644
--- a/gdb/testsuite/gdb.threads/multiple-successive-infcall.c
+++ b/gdb/testsuite/gdb.threads/multiple-successive-infcall.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2018-2024 Free Software Foundation, Inc.
+ Copyright 2018-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/multiple-successive-infcall.exp b/gdb/testsuite/gdb.threads/multiple-successive-infcall.exp
index 4a97179..2694ce5 100644
--- a/gdb/testsuite/gdb.threads/multiple-successive-infcall.exp
+++ b/gdb/testsuite/gdb.threads/multiple-successive-infcall.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2018-2024 Free Software Foundation, Inc.
+# Copyright (C) 2018-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
return -1
}
-clean_restart "${binfile}"
+clean_restart "${::testfile}"
if {![runto_main]} {
return 0
diff --git a/gdb/testsuite/gdb.threads/names.c b/gdb/testsuite/gdb.threads/names.c
index 55a99ef..6a26709 100644
--- a/gdb/testsuite/gdb.threads/names.c
+++ b/gdb/testsuite/gdb.threads/names.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2015-2024 Free Software Foundation, Inc.
+ Copyright 2015-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/names.exp b/gdb/testsuite/gdb.threads/names.exp
index cf94e42..6f38c4e 100644
--- a/gdb/testsuite/gdb.threads/names.exp
+++ b/gdb/testsuite/gdb.threads/names.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2024 Free Software Foundation, Inc.
+# Copyright (C) 2015-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/next-bp-other-thread.c b/gdb/testsuite/gdb.threads/next-bp-other-thread.c
index cf313cb..0268578 100644
--- a/gdb/testsuite/gdb.threads/next-bp-other-thread.c
+++ b/gdb/testsuite/gdb.threads/next-bp-other-thread.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2014-2024 Free Software Foundation, Inc.
+ Copyright 2014-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/next-bp-other-thread.exp b/gdb/testsuite/gdb.threads/next-bp-other-thread.exp
index 8e79150..6b696dd 100644
--- a/gdb/testsuite/gdb.threads/next-bp-other-thread.exp
+++ b/gdb/testsuite/gdb.threads/next-bp-other-thread.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2024 Free Software Foundation, Inc.
+# Copyright (C) 2014-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ if {[build_executable "failed to prepare" $testfile $srcfile \
# Test all "set scheduler-locking" variants.
foreach schedlock {"off" "step" "on" } {
with_test_prefix "schedlock=$schedlock" {
- clean_restart $binfile
+ clean_restart $::testfile
if ![runto_main] {
continue
diff --git a/gdb/testsuite/gdb.threads/next-fork-exec-other-thread.c b/gdb/testsuite/gdb.threads/next-fork-exec-other-thread.c
index 7694a89..968affa 100644
--- a/gdb/testsuite/gdb.threads/next-fork-exec-other-thread.c
+++ b/gdb/testsuite/gdb.threads/next-fork-exec-other-thread.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2023-2024 Free Software Foundation, Inc.
+ Copyright 2023-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/next-fork-exec-other-thread.exp b/gdb/testsuite/gdb.threads/next-fork-exec-other-thread.exp
index 3413605..82e85a6 100644
--- a/gdb/testsuite/gdb.threads/next-fork-exec-other-thread.exp
+++ b/gdb/testsuite/gdb.threads/next-fork-exec-other-thread.exp
@@ -1,4 +1,4 @@
-# Copyright 2022-2024 Free Software Foundation, Inc.
+# Copyright 2022-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -25,6 +25,8 @@
# 20.04.5 LTS with 32-bit kernel + 32-bit userland. It was NOT reproducible
# using a circa 2023 Raspberry Pi OS w/ 64-bit kernel and 32-bit userland.
+require allow_fork_tests
+
standard_testfile
# Line where to stop the main thread.
@@ -65,7 +67,7 @@ proc do_test { fork_func target-non-stop non-stop displaced-stepping } {
save_vars { ::GDBFLAGS } {
append ::GDBFLAGS " -ex \"maintenance set target-non-stop ${target-non-stop}\""
append ::GDBFLAGS " -ex \"set non-stop ${non-stop}\""
- clean_restart ${::binfile}-${fork_func}
+ clean_restart ${::testfile}-${fork_func}
}
gdb_test_no_output "set displaced-stepping ${displaced-stepping}"
diff --git a/gdb/testsuite/gdb.threads/next-fork-other-thread.c b/gdb/testsuite/gdb.threads/next-fork-other-thread.c
index fec874c..7bf3b14 100644
--- a/gdb/testsuite/gdb.threads/next-fork-other-thread.c
+++ b/gdb/testsuite/gdb.threads/next-fork-other-thread.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2022-2024 Free Software Foundation, Inc.
+ Copyright 2022-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/next-fork-other-thread.exp b/gdb/testsuite/gdb.threads/next-fork-other-thread.exp
index 5526f4e..9349091 100644
--- a/gdb/testsuite/gdb.threads/next-fork-other-thread.exp
+++ b/gdb/testsuite/gdb.threads/next-fork-other-thread.exp
@@ -1,4 +1,4 @@
-# Copyright 2022-2024 Free Software Foundation, Inc.
+# Copyright 2022-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,6 +16,8 @@
# Test doing a "next" on a thread during which forks or vforks happen in other
# threads.
+require allow_fork_tests
+
standard_testfile
# Line where to stop the main thread.
@@ -56,7 +58,7 @@ proc do_test { fork_func target-non-stop non-stop displaced-stepping } {
save_vars { ::GDBFLAGS } {
append ::GDBFLAGS " -ex \"maintenance set target-non-stop ${target-non-stop}\""
append ::GDBFLAGS " -ex \"set non-stop ${non-stop}\""
- clean_restart ${::binfile}-${fork_func}
+ clean_restart ${::testfile}-${fork_func}
}
gdb_test_no_output "set displaced-stepping ${displaced-stepping}"
diff --git a/gdb/testsuite/gdb.threads/next-while-other-thread-longjmps.c b/gdb/testsuite/gdb.threads/next-while-other-thread-longjmps.c
index b170cb7..26ae6ca 100644
--- a/gdb/testsuite/gdb.threads/next-while-other-thread-longjmps.c
+++ b/gdb/testsuite/gdb.threads/next-while-other-thread-longjmps.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2015-2024 Free Software Foundation, Inc.
+ Copyright 2015-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/next-while-other-thread-longjmps.exp b/gdb/testsuite/gdb.threads/next-while-other-thread-longjmps.exp
index 2b77cfd..fd4aebb 100644
--- a/gdb/testsuite/gdb.threads/next-while-other-thread-longjmps.exp
+++ b/gdb/testsuite/gdb.threads/next-while-other-thread-longjmps.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2024 Free Software Foundation, Inc.
+# Copyright (C) 2015-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/no-unwaited-for-left.c b/gdb/testsuite/gdb.threads/no-unwaited-for-left.c
index 2e86479..2539cde 100644
--- a/gdb/testsuite/gdb.threads/no-unwaited-for-left.c
+++ b/gdb/testsuite/gdb.threads/no-unwaited-for-left.c
@@ -1,4 +1,4 @@
-/* Copyright 2007-2024 Free Software Foundation, Inc.
+/* Copyright 2007-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/no-unwaited-for-left.exp b/gdb/testsuite/gdb.threads/no-unwaited-for-left.exp
index e04cd6b..edeabaf 100644
--- a/gdb/testsuite/gdb.threads/no-unwaited-for-left.exp
+++ b/gdb/testsuite/gdb.threads/no-unwaited-for-left.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2024 Free Software Foundation, Inc.
+# Copyright (C) 2007-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/non-ldr-exc-1.c b/gdb/testsuite/gdb.threads/non-ldr-exc-1.c
index 005808a..4cac632 100644
--- a/gdb/testsuite/gdb.threads/non-ldr-exc-1.c
+++ b/gdb/testsuite/gdb.threads/non-ldr-exc-1.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2009-2024 Free Software Foundation, Inc.
+ Copyright 2009-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/non-ldr-exc-1.exp b/gdb/testsuite/gdb.threads/non-ldr-exc-1.exp
index df0bf16..846fe89 100644
--- a/gdb/testsuite/gdb.threads/non-ldr-exc-1.exp
+++ b/gdb/testsuite/gdb.threads/non-ldr-exc-1.exp
@@ -1,4 +1,4 @@
-# Copyright 2009-2024 Free Software Foundation, Inc.
+# Copyright 2009-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/non-ldr-exc-2.c b/gdb/testsuite/gdb.threads/non-ldr-exc-2.c
index 4026a74..a1b4dc2 100644
--- a/gdb/testsuite/gdb.threads/non-ldr-exc-2.c
+++ b/gdb/testsuite/gdb.threads/non-ldr-exc-2.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2009-2024 Free Software Foundation, Inc.
+ Copyright 2009-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/non-ldr-exc-2.exp b/gdb/testsuite/gdb.threads/non-ldr-exc-2.exp
index de63df3..860b6b5 100644
--- a/gdb/testsuite/gdb.threads/non-ldr-exc-2.exp
+++ b/gdb/testsuite/gdb.threads/non-ldr-exc-2.exp
@@ -1,4 +1,4 @@
-# Copyright 2009-2024 Free Software Foundation, Inc.
+# Copyright 2009-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/non-ldr-exc-3.c b/gdb/testsuite/gdb.threads/non-ldr-exc-3.c
index 7b4d0c6..68b9ae3 100644
--- a/gdb/testsuite/gdb.threads/non-ldr-exc-3.c
+++ b/gdb/testsuite/gdb.threads/non-ldr-exc-3.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2009-2024 Free Software Foundation, Inc.
+ Copyright 2009-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/non-ldr-exc-3.exp b/gdb/testsuite/gdb.threads/non-ldr-exc-3.exp
index a91d667..b50bfac 100644
--- a/gdb/testsuite/gdb.threads/non-ldr-exc-3.exp
+++ b/gdb/testsuite/gdb.threads/non-ldr-exc-3.exp
@@ -1,4 +1,4 @@
-# Copyright 2009-2024 Free Software Foundation, Inc.
+# Copyright 2009-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/non-ldr-exc-4.c b/gdb/testsuite/gdb.threads/non-ldr-exc-4.c
index 62dc86e..3719190 100644
--- a/gdb/testsuite/gdb.threads/non-ldr-exc-4.c
+++ b/gdb/testsuite/gdb.threads/non-ldr-exc-4.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2009-2024 Free Software Foundation, Inc.
+ Copyright 2009-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/non-ldr-exc-4.exp b/gdb/testsuite/gdb.threads/non-ldr-exc-4.exp
index b9d2eaa..9892d83 100644
--- a/gdb/testsuite/gdb.threads/non-ldr-exc-4.exp
+++ b/gdb/testsuite/gdb.threads/non-ldr-exc-4.exp
@@ -1,4 +1,4 @@
-# Copyright 2009-2024 Free Software Foundation, Inc.
+# Copyright 2009-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/non-ldr-exit.c b/gdb/testsuite/gdb.threads/non-ldr-exit.c
index e644b81..9536b4a 100644
--- a/gdb/testsuite/gdb.threads/non-ldr-exit.c
+++ b/gdb/testsuite/gdb.threads/non-ldr-exit.c
@@ -1,6 +1,6 @@
/* Clean exit of the thread group leader should not break GDB.
- Copyright 2015-2024 Free Software Foundation, Inc.
+ Copyright 2015-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/non-ldr-exit.exp b/gdb/testsuite/gdb.threads/non-ldr-exit.exp
index bb8b56b..b09a37e 100644
--- a/gdb/testsuite/gdb.threads/non-ldr-exit.exp
+++ b/gdb/testsuite/gdb.threads/non-ldr-exit.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2024 Free Software Foundation, Inc.
+# Copyright (C) 2015-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/non-stop-fair-events.c b/gdb/testsuite/gdb.threads/non-stop-fair-events.c
index 96adecd..3e7441d 100644
--- a/gdb/testsuite/gdb.threads/non-stop-fair-events.c
+++ b/gdb/testsuite/gdb.threads/non-stop-fair-events.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2014-2024 Free Software Foundation, Inc.
+ Copyright 2014-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/non-stop-fair-events.exp b/gdb/testsuite/gdb.threads/non-stop-fair-events.exp
index 1ebb886..5def610 100644
--- a/gdb/testsuite/gdb.threads/non-stop-fair-events.exp
+++ b/gdb/testsuite/gdb.threads/non-stop-fair-events.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2024 Free Software Foundation, Inc.
+# Copyright (C) 2014-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/omp-par-scope.c b/gdb/testsuite/gdb.threads/omp-par-scope.c
index 5f061f0..626ca16 100644
--- a/gdb/testsuite/gdb.threads/omp-par-scope.c
+++ b/gdb/testsuite/gdb.threads/omp-par-scope.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2017-2024 Free Software Foundation, Inc.
+ Copyright 2017-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/omp-par-scope.exp b/gdb/testsuite/gdb.threads/omp-par-scope.exp
index 48f81d3..27dbaf0 100644
--- a/gdb/testsuite/gdb.threads/omp-par-scope.exp
+++ b/gdb/testsuite/gdb.threads/omp-par-scope.exp
@@ -1,4 +1,4 @@
-# Copyright 2017-2024 Free Software Foundation, Inc.
+# Copyright 2017-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/omp-task.c b/gdb/testsuite/gdb.threads/omp-task.c
index 515e4a1..bc0ab90 100644
--- a/gdb/testsuite/gdb.threads/omp-task.c
+++ b/gdb/testsuite/gdb.threads/omp-task.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2022-2024 Free Software Foundation, Inc.
+ Copyright 2022-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/omp-task.exp b/gdb/testsuite/gdb.threads/omp-task.exp
index 3e8e170..a889c84 100644
--- a/gdb/testsuite/gdb.threads/omp-task.exp
+++ b/gdb/testsuite/gdb.threads/omp-task.exp
@@ -1,4 +1,4 @@
-# Copyright 2022-2024 Free Software Foundation, Inc.
+# Copyright 2022-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/pending-fork-event-detach-ns.c b/gdb/testsuite/gdb.threads/pending-fork-event-detach-ns.c
index f7fdd42..af15b9f 100644
--- a/gdb/testsuite/gdb.threads/pending-fork-event-detach-ns.c
+++ b/gdb/testsuite/gdb.threads/pending-fork-event-detach-ns.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2021-2024 Free Software Foundation, Inc.
+ Copyright 2021-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/pending-fork-event-detach-ns.exp b/gdb/testsuite/gdb.threads/pending-fork-event-detach-ns.exp
index e3cb4ae..9cc4978 100644
--- a/gdb/testsuite/gdb.threads/pending-fork-event-detach-ns.exp
+++ b/gdb/testsuite/gdb.threads/pending-fork-event-detach-ns.exp
@@ -1,4 +1,4 @@
-# Copyright 2021-2024 Free Software Foundation, Inc.
+# Copyright 2021-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -29,6 +29,8 @@
# parent thread from waitpid'ing it, preventing the main thread from joining
# it, prevent it from writing the flag file, failing the test.
+require allow_fork_tests
+
standard_testfile
if { [is_remote target] } {
@@ -50,7 +52,7 @@ proc do_test { } {
save_vars { ::GDBFLAGS } {
append ::GDBFLAGS " -ex \"set non-stop on\""
- clean_restart $::binfile
+ clean_restart $::testfile
}
if { ![runto break_here_first] } {
diff --git a/gdb/testsuite/gdb.threads/pending-fork-event-detach-touch-file.c b/gdb/testsuite/gdb.threads/pending-fork-event-detach-touch-file.c
index 84a505c..fdce1cb 100644
--- a/gdb/testsuite/gdb.threads/pending-fork-event-detach-touch-file.c
+++ b/gdb/testsuite/gdb.threads/pending-fork-event-detach-touch-file.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2021-2024 Free Software Foundation, Inc.
+ Copyright 2021-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/pending-fork-event-detach.c b/gdb/testsuite/gdb.threads/pending-fork-event-detach.c
index 1c0a07d..4ce4abd 100644
--- a/gdb/testsuite/gdb.threads/pending-fork-event-detach.c
+++ b/gdb/testsuite/gdb.threads/pending-fork-event-detach.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2021-2024 Free Software Foundation, Inc.
+ Copyright 2021-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/pending-fork-event-detach.exp b/gdb/testsuite/gdb.threads/pending-fork-event-detach.exp
index 4b16eaa..fa86488 100644
--- a/gdb/testsuite/gdb.threads/pending-fork-event-detach.exp
+++ b/gdb/testsuite/gdb.threads/pending-fork-event-detach.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2021-2024 Free Software Foundation, Inc.
+# Copyright (C) 2021-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -34,6 +34,8 @@
# event, and erroneously create a new inferior for it. Once fixed, the child
# process' thread is hidden by whoever holds the pending fork event.
+require allow_fork_tests
+
standard_testfile .c -touch-file.c
set touch_file_bin $binfile-touch-file
@@ -91,7 +93,8 @@ proc do_test { target-non-stop who_forks fork_function stop_mode } {
save_vars { ::GDBFLAGS } {
append ::GDBFLAGS " -ex \"maintenance set target-non-stop ${target-non-stop}\""
- clean_restart $this_binfile
+ clean_restart
+ gdb_load $this_binfile
}
if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.threads/pending-step.c b/gdb/testsuite/gdb.threads/pending-step.c
index 795e8f5..3bd091c 100644
--- a/gdb/testsuite/gdb.threads/pending-step.c
+++ b/gdb/testsuite/gdb.threads/pending-step.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2002-2024 Free Software Foundation, Inc.
+ Copyright 2002-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/pending-step.exp b/gdb/testsuite/gdb.threads/pending-step.exp
index 64b421b..d31f879 100644
--- a/gdb/testsuite/gdb.threads/pending-step.exp
+++ b/gdb/testsuite/gdb.threads/pending-step.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2024 Free Software Foundation, Inc.
+# Copyright (C) 2009-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -54,7 +54,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
if {![runto_main]} {
return 0
diff --git a/gdb/testsuite/gdb.threads/print-threads.exp b/gdb/testsuite/gdb.threads/print-threads.exp
index 6fae36a..3d2dc14 100644
--- a/gdb/testsuite/gdb.threads/print-threads.exp
+++ b/gdb/testsuite/gdb.threads/print-threads.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1996-2024 Free Software Foundation, Inc.
+# Copyright (C) 1996-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -32,7 +32,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
# Now we can proceed with the real testing.
-clean_restart ${binfile}
+clean_restart ${::testfile}
gdb_test_no_output "set print sevenbit-strings"
#gdb_test_no_output "set print address off"
diff --git a/gdb/testsuite/gdb.threads/process-dies-while-detaching.c b/gdb/testsuite/gdb.threads/process-dies-while-detaching.c
index f9acc1f..2de535b 100644
--- a/gdb/testsuite/gdb.threads/process-dies-while-detaching.c
+++ b/gdb/testsuite/gdb.threads/process-dies-while-detaching.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2016-2024 Free Software Foundation, Inc.
+ Copyright 2016-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/process-dies-while-detaching.exp b/gdb/testsuite/gdb.threads/process-dies-while-detaching.exp
index 5c54a36..6c6a4b1 100644
--- a/gdb/testsuite/gdb.threads/process-dies-while-detaching.exp
+++ b/gdb/testsuite/gdb.threads/process-dies-while-detaching.exp
@@ -1,4 +1,4 @@
-# Copyright 2016-2024 Free Software Foundation, Inc.
+# Copyright 2016-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
@@ -43,6 +43,7 @@
# threads are reaped. We test that as well.
standard_testfile
+set testfile_base $testfile
# Test that GDBserver exits.
@@ -214,7 +215,7 @@ proc test_detach {multi_process cmd} {
with_test_prefix "detach" {
global binfile
- clean_restart ${binfile}
+ clean_restart ${::testfile}
if ![runto_main] {
return -1
@@ -242,7 +243,7 @@ proc test_detach_watch {wp multi_process cmd} {
with_test_prefix "watchpoint:$wp" {
global binfile decimal
- clean_restart ${binfile}
+ clean_restart ${::testfile}
if ![runto_main] {
return -1
@@ -290,7 +291,7 @@ proc test_detach_killed_outside {multi_process cmd} {
with_test_prefix "killed outside" {
global binfile
- clean_restart ${binfile}
+ clean_restart ${::testfile}
if ![runto_main] {
return -1
@@ -334,14 +335,15 @@ proc do_test {multi_process cmd} {
return
}
- set binfile [standard_output_file ${testfile}-$multi_process-$cmd]
+ set testfile $::testfile_base-$multi_process-$cmd
+ set binfile [standard_output_file $testfile]
set options {debug pthreads}
if {$multi_process} {
lappend options "additional_flags=-DMULTIPROCESS"
}
if {[build_executable "failed to build" \
- $testfile-$multi_process-$cmd $srcfile $options] == -1} {
+ $testfile $srcfile $options] == -1} {
return -1
}
diff --git a/gdb/testsuite/gdb.threads/process-dies-while-handling-bp.c b/gdb/testsuite/gdb.threads/process-dies-while-handling-bp.c
index 738f150..887956c 100644
--- a/gdb/testsuite/gdb.threads/process-dies-while-handling-bp.c
+++ b/gdb/testsuite/gdb.threads/process-dies-while-handling-bp.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2015-2024 Free Software Foundation, Inc.
+ Copyright 2015-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/process-dies-while-handling-bp.exp b/gdb/testsuite/gdb.threads/process-dies-while-handling-bp.exp
index 4ff68a6..a990dc9 100644
--- a/gdb/testsuite/gdb.threads/process-dies-while-handling-bp.exp
+++ b/gdb/testsuite/gdb.threads/process-dies-while-handling-bp.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2024 Free Software Foundation, Inc.
+# Copyright (C) 2015-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -42,7 +42,7 @@ proc do_test { non_stop cond_bp_target } {
save_vars { GDBFLAGS } {
set GDBFLAGS [concat $GDBFLAGS " -ex \"set non-stop $non_stop\""]
- clean_restart $binfile
+ clean_restart $::testfile
}
if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.threads/process-exit-status-is-leader-exit-status.c b/gdb/testsuite/gdb.threads/process-exit-status-is-leader-exit-status.c
index bd998f9..e3a4153 100644
--- a/gdb/testsuite/gdb.threads/process-exit-status-is-leader-exit-status.c
+++ b/gdb/testsuite/gdb.threads/process-exit-status-is-leader-exit-status.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2022-2024 Free Software Foundation, Inc.
+ Copyright 2022-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/process-exit-status-is-leader-exit-status.exp b/gdb/testsuite/gdb.threads/process-exit-status-is-leader-exit-status.exp
index 6b509f3..ec4dbd8 100644
--- a/gdb/testsuite/gdb.threads/process-exit-status-is-leader-exit-status.exp
+++ b/gdb/testsuite/gdb.threads/process-exit-status-is-leader-exit-status.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2022-2024 Free Software Foundation, Inc.
+# Copyright (C) 2022-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/pthread_cond_wait.c b/gdb/testsuite/gdb.threads/pthread_cond_wait.c
index a131981..e1e513e 100644
--- a/gdb/testsuite/gdb.threads/pthread_cond_wait.c
+++ b/gdb/testsuite/gdb.threads/pthread_cond_wait.c
@@ -1,6 +1,6 @@
/* A small multi-threaded test case.
- Copyright 2004-2024 Free Software Foundation, Inc.
+ Copyright 2004-2025 Free Software Foundation, Inc.
This file is part of GDB.
diff --git a/gdb/testsuite/gdb.threads/pthread_cond_wait.exp b/gdb/testsuite/gdb.threads/pthread_cond_wait.exp
index 03c5a58..e914db0 100644
--- a/gdb/testsuite/gdb.threads/pthread_cond_wait.exp
+++ b/gdb/testsuite/gdb.threads/pthread_cond_wait.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2024 Free Software Foundation, Inc.
+# Copyright (C) 2004-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
runto_main
gdb_test "break break_me" \
diff --git a/gdb/testsuite/gdb.threads/pthreads.c b/gdb/testsuite/gdb.threads/pthreads.c
index 74d37cf..f84f273 100644
--- a/gdb/testsuite/gdb.threads/pthreads.c
+++ b/gdb/testsuite/gdb.threads/pthreads.c
@@ -1,5 +1,5 @@
/* Pthreads test program.
- Copyright 1996-2024 Free Software Foundation, Inc.
+ Copyright 1996-2025 Free Software Foundation, Inc.
Written by Fred Fish of Cygnus Support
Contributed by Cygnus Support
diff --git a/gdb/testsuite/gdb.threads/pthreads.exp b/gdb/testsuite/gdb.threads/pthreads.exp
index 4a63a53..04ae91e2 100644
--- a/gdb/testsuite/gdb.threads/pthreads.exp
+++ b/gdb/testsuite/gdb.threads/pthreads.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1996-2024 Free Software Foundation, Inc.
+# Copyright (C) 1996-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -34,7 +34,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
gdb_test_no_output "set print sevenbit-strings"
#gdb_test_no_output "set print address off"
diff --git a/gdb/testsuite/gdb.threads/queue-signal.c b/gdb/testsuite/gdb.threads/queue-signal.c
index 9351248..7caf5f7 100644
--- a/gdb/testsuite/gdb.threads/queue-signal.c
+++ b/gdb/testsuite/gdb.threads/queue-signal.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2014-2024 Free Software Foundation, Inc.
+ Copyright 2014-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/queue-signal.exp b/gdb/testsuite/gdb.threads/queue-signal.exp
index 536cf97..34abc3b 100644
--- a/gdb/testsuite/gdb.threads/queue-signal.exp
+++ b/gdb/testsuite/gdb.threads/queue-signal.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2024 Free Software Foundation, Inc.
+# Copyright (C) 2014-2025 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
if ![runto_main] {
return 0
diff --git a/gdb/testsuite/gdb.threads/reconnect-signal.c b/gdb/testsuite/gdb.threads/reconnect-signal.c
index 14d95a5..3be516e 100644
--- a/gdb/testsuite/gdb.threads/reconnect-signal.c
+++ b/gdb/testsuite/gdb.threads/reconnect-signal.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2013-2024 Free Software Foundation, Inc.
+ Copyright 2013-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/reconnect-signal.exp b/gdb/testsuite/gdb.threads/reconnect-signal.exp
index ccaf082..ce64610 100644
--- a/gdb/testsuite/gdb.threads/reconnect-signal.exp
+++ b/gdb/testsuite/gdb.threads/reconnect-signal.exp
@@ -1,4 +1,4 @@
-# Copyright 2013-2024 Free Software Foundation, Inc.
+# Copyright 2013-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/schedlock-new-thread.c b/gdb/testsuite/gdb.threads/schedlock-new-thread.c
index cd4a2a5..06af905 100644
--- a/gdb/testsuite/gdb.threads/schedlock-new-thread.c
+++ b/gdb/testsuite/gdb.threads/schedlock-new-thread.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2021-2024 Free Software Foundation, Inc.
+ Copyright 2021-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/schedlock-new-thread.exp b/gdb/testsuite/gdb.threads/schedlock-new-thread.exp
index 665838d..5fda4b8 100644
--- a/gdb/testsuite/gdb.threads/schedlock-new-thread.exp
+++ b/gdb/testsuite/gdb.threads/schedlock-new-thread.exp
@@ -1,4 +1,4 @@
-# Copyright 2021-2024 Free Software Foundation, Inc.
+# Copyright 2021-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@ proc test {non-stop schedlock} {
save_vars ::GDBFLAGS {
append ::GDBFLAGS " -ex \"set non-stop ${non-stop}\""
set sl [expr $schedlock == "on" ? 1 : 0]
- clean_restart $::binfile-$sl
+ clean_restart $::testfile-$sl
}
set linenum1 [gdb_get_line_number "set break 1 here"]
diff --git a/gdb/testsuite/gdb.threads/schedlock-thread-exit.c b/gdb/testsuite/gdb.threads/schedlock-thread-exit.c
index ae5bde7..9aa452d 100644
--- a/gdb/testsuite/gdb.threads/schedlock-thread-exit.c
+++ b/gdb/testsuite/gdb.threads/schedlock-thread-exit.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2021-2024 Free Software Foundation, Inc.
+ Copyright 2021-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/schedlock-thread-exit.exp b/gdb/testsuite/gdb.threads/schedlock-thread-exit.exp
index e894387..137f652 100644
--- a/gdb/testsuite/gdb.threads/schedlock-thread-exit.exp
+++ b/gdb/testsuite/gdb.threads/schedlock-thread-exit.exp
@@ -1,4 +1,4 @@
-# Copyright 2021-2024 Free Software Foundation, Inc.
+# Copyright 2021-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ if { [build_executable "failed to prepare" ${testfile} ${srcfile} \
}
proc do_test { } {
- clean_restart $::binfile
+ clean_restart $::testfile
# One of the launched threads will report a stop on thread_func. Some
# others will also stop on thread_func and have a pending status.
diff --git a/gdb/testsuite/gdb.threads/schedlock.c b/gdb/testsuite/gdb.threads/schedlock.c
index 2ca7a1a..2a25558 100644
--- a/gdb/testsuite/gdb.threads/schedlock.c
+++ b/gdb/testsuite/gdb.threads/schedlock.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2002-2024 Free Software Foundation, Inc.
+ Copyright 2002-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/schedlock.exp b/gdb/testsuite/gdb.threads/schedlock.exp
index 4e99961..4e2b835 100644
--- a/gdb/testsuite/gdb.threads/schedlock.exp
+++ b/gdb/testsuite/gdb.threads/schedlock.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1996-2024 Free Software Foundation, Inc.
+# Copyright (C) 1996-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/siginfo-threads.c b/gdb/testsuite/gdb.threads/siginfo-threads.c
index 22c6038..ed1afb7 100644
--- a/gdb/testsuite/gdb.threads/siginfo-threads.c
+++ b/gdb/testsuite/gdb.threads/siginfo-threads.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2010-2024 Free Software Foundation, Inc.
+ Copyright 2010-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/siginfo-threads.exp b/gdb/testsuite/gdb.threads/siginfo-threads.exp
index cf43a83..ecc372d 100644
--- a/gdb/testsuite/gdb.threads/siginfo-threads.exp
+++ b/gdb/testsuite/gdb.threads/siginfo-threads.exp
@@ -1,4 +1,4 @@
-# Copyright 2010-2024 Free Software Foundation, Inc.
+# Copyright 2010-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/signal-command-handle-nopass.c b/gdb/testsuite/gdb.threads/signal-command-handle-nopass.c
index 548d0d3..fec4176 100644
--- a/gdb/testsuite/gdb.threads/signal-command-handle-nopass.c
+++ b/gdb/testsuite/gdb.threads/signal-command-handle-nopass.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2014-2024 Free Software Foundation, Inc.
+ Copyright 2014-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/signal-command-handle-nopass.exp b/gdb/testsuite/gdb.threads/signal-command-handle-nopass.exp
index 808006a..6d344e3 100644
--- a/gdb/testsuite/gdb.threads/signal-command-handle-nopass.exp
+++ b/gdb/testsuite/gdb.threads/signal-command-handle-nopass.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2024 Free Software Foundation, Inc.
+# Copyright (C) 2014-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -35,7 +35,7 @@ proc test { step_over } {
global srcfile binfile tdlabel_re
with_test_prefix "step-over $step_over" {
- clean_restart ${binfile}
+ clean_restart ${::testfile}
if {![runto_main]} {
return 0
diff --git a/gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.c b/gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.c
index 3c49cf5..1d3004a 100644
--- a/gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.c
+++ b/gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2014-2024 Free Software Foundation, Inc.
+ Copyright 2014-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.exp b/gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.exp
index 5f47d75..acb018b 100644
--- a/gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.exp
+++ b/gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2024 Free Software Foundation, Inc.
+# Copyright (C) 2014-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -32,7 +32,7 @@ proc test { schedlock } {
global srcfile binfile tdlabel_re
with_test_prefix "schedlock $schedlock" {
- clean_restart ${binfile}
+ clean_restart ${::testfile}
if {![runto_main]} {
return 0
diff --git a/gdb/testsuite/gdb.threads/signal-delivered-right-thread.c b/gdb/testsuite/gdb.threads/signal-delivered-right-thread.c
index 2c10e57..55e68a2 100644
--- a/gdb/testsuite/gdb.threads/signal-delivered-right-thread.c
+++ b/gdb/testsuite/gdb.threads/signal-delivered-right-thread.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2014-2024 Free Software Foundation, Inc.
+ Copyright 2014-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/signal-delivered-right-thread.exp b/gdb/testsuite/gdb.threads/signal-delivered-right-thread.exp
index 71a8598..9de0908 100644
--- a/gdb/testsuite/gdb.threads/signal-delivered-right-thread.exp
+++ b/gdb/testsuite/gdb.threads/signal-delivered-right-thread.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2024 Free Software Foundation, Inc.
+# Copyright (C) 2014-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -29,7 +29,7 @@ proc test { command } {
global srcfile binfile tdlabel_re
with_test_prefix "$command" {
- clean_restart ${binfile}
+ clean_restart ${::testfile}
if {![runto_main]} {
return 0
diff --git a/gdb/testsuite/gdb.threads/signal-sigtrap.c b/gdb/testsuite/gdb.threads/signal-sigtrap.c
index 7c903a1..7547f4a 100644
--- a/gdb/testsuite/gdb.threads/signal-sigtrap.c
+++ b/gdb/testsuite/gdb.threads/signal-sigtrap.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2014-2024 Free Software Foundation, Inc.
+ Copyright 2014-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/signal-sigtrap.exp b/gdb/testsuite/gdb.threads/signal-sigtrap.exp
index 8058a5b..849d628 100644
--- a/gdb/testsuite/gdb.threads/signal-sigtrap.exp
+++ b/gdb/testsuite/gdb.threads/signal-sigtrap.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2024 Free Software Foundation, Inc.
+# Copyright (C) 2014-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -32,7 +32,7 @@ proc test { sigtrap_thread } {
global srcfile binfile tdlabel_re
with_test_prefix "sigtrap thread $sigtrap_thread" {
- clean_restart ${binfile}
+ clean_restart ${::testfile}
if {![runto "thread_function"]} {
return 0
diff --git a/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.c b/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.c
index 74da73e..f103258 100644
--- a/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.c
+++ b/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2009-2024 Free Software Foundation, Inc.
+ Copyright 2009-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
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 3b1e4b7..e2f7581 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
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2024 Free Software Foundation, Inc.
+# Copyright (C) 2011-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/sigstep-threads.c b/gdb/testsuite/gdb.threads/sigstep-threads.c
index e6e63cc..3210bae 100644
--- a/gdb/testsuite/gdb.threads/sigstep-threads.c
+++ b/gdb/testsuite/gdb.threads/sigstep-threads.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2010-2024 Free Software Foundation, Inc.
+ Copyright 2010-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/sigstep-threads.exp b/gdb/testsuite/gdb.threads/sigstep-threads.exp
index d0032b3..0580cd0 100644
--- a/gdb/testsuite/gdb.threads/sigstep-threads.exp
+++ b/gdb/testsuite/gdb.threads/sigstep-threads.exp
@@ -1,4 +1,4 @@
-# Copyright 2010-2024 Free Software Foundation, Inc.
+# Copyright 2010-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/sigthread.exp b/gdb/testsuite/gdb.threads/sigthread.exp
index 024fc08..dea8eb8 100644
--- a/gdb/testsuite/gdb.threads/sigthread.exp
+++ b/gdb/testsuite/gdb.threads/sigthread.exp
@@ -1,5 +1,5 @@
# sigthread.exp -- Expect script to test thread and signal interaction
-# Copyright (C) 2007-2024 Free Software Foundation, Inc.
+# Copyright (C) 2007-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
if {![runto_main]} {
return 0
diff --git a/gdb/testsuite/gdb.threads/slow-waitpid.c b/gdb/testsuite/gdb.threads/slow-waitpid.c
index 280b109..f98b798 100644
--- a/gdb/testsuite/gdb.threads/slow-waitpid.c
+++ b/gdb/testsuite/gdb.threads/slow-waitpid.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2018-2024 Free Software Foundation, Inc.
+ Copyright 2018-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/staticthreads.c b/gdb/testsuite/gdb.threads/staticthreads.c
index 1a38716..579f59d 100644
--- a/gdb/testsuite/gdb.threads/staticthreads.c
+++ b/gdb/testsuite/gdb.threads/staticthreads.c
@@ -1,6 +1,6 @@
/* This test program is part of GDB, The GNU debugger.
- Copyright 2004-2024 Free Software Foundation, Inc.
+ Copyright 2004-2025 Free Software Foundation, Inc.
Originally written by Jeff Johnston <jjohnstn@redhat.com>,
contributed by Red Hat
diff --git a/gdb/testsuite/gdb.threads/staticthreads.exp b/gdb/testsuite/gdb.threads/staticthreads.exp
index 320bbbb..bbe11ab 100644
--- a/gdb/testsuite/gdb.threads/staticthreads.exp
+++ b/gdb/testsuite/gdb.threads/staticthreads.exp
@@ -1,6 +1,6 @@
# static.exp -- test script, for GDB, the GNU debugger.
-# Copyright 2004-2024 Free Software Foundation, Inc.
+# Copyright 2004-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -34,7 +34,7 @@ foreach_with_prefix have_tls { "-DHAVE_TLS" "" } {
}
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
gdb_test_no_output "set print sevenbit-strings"
@@ -94,7 +94,7 @@ gdb_test_multiple "quit" "$test" {
pass "$test"
}
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
if { "$have_tls" != "" } {
diff --git a/gdb/testsuite/gdb.threads/step-N-all-progress.c b/gdb/testsuite/gdb.threads/step-N-all-progress.c
index 9f7b6a1..10a0e24 100644
--- a/gdb/testsuite/gdb.threads/step-N-all-progress.c
+++ b/gdb/testsuite/gdb.threads/step-N-all-progress.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2022-2024 Free Software Foundation, Inc.
+ Copyright 2022-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/step-N-all-progress.exp b/gdb/testsuite/gdb.threads/step-N-all-progress.exp
index 2ef7c0b..031e36a 100644
--- a/gdb/testsuite/gdb.threads/step-N-all-progress.exp
+++ b/gdb/testsuite/gdb.threads/step-N-all-progress.exp
@@ -1,4 +1,4 @@
-# Copyright 2022-2024 Free Software Foundation, Inc.
+# Copyright 2022-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@ proc test {non-stop target-non-stop} {
save_vars ::GDBFLAGS {
append ::GDBFLAGS " -ex \"maintenance set target-non-stop ${target-non-stop}\""
append ::GDBFLAGS " -ex \"set non-stop ${non-stop}\""
- clean_restart $::binfile
+ clean_restart $::testfile
}
if { ![runto_main] } {
diff --git a/gdb/testsuite/gdb.threads/step-bg-decr-pc-switch-thread.c b/gdb/testsuite/gdb.threads/step-bg-decr-pc-switch-thread.c
index 71cbdc0..8950250 100644
--- a/gdb/testsuite/gdb.threads/step-bg-decr-pc-switch-thread.c
+++ b/gdb/testsuite/gdb.threads/step-bg-decr-pc-switch-thread.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2015-2024 Free Software Foundation, Inc.
+ Copyright 2015-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/step-bg-decr-pc-switch-thread.exp b/gdb/testsuite/gdb.threads/step-bg-decr-pc-switch-thread.exp
index 7726c7f..309c826 100644
--- a/gdb/testsuite/gdb.threads/step-bg-decr-pc-switch-thread.exp
+++ b/gdb/testsuite/gdb.threads/step-bg-decr-pc-switch-thread.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2024 Free Software Foundation, Inc.
+# Copyright (C) 2014-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/step-over-exec-execd.c b/gdb/testsuite/gdb.threads/step-over-exec-execd.c
index dc40255..bbb929e 100644
--- a/gdb/testsuite/gdb.threads/step-over-exec-execd.c
+++ b/gdb/testsuite/gdb.threads/step-over-exec-execd.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2020-2024 Free Software Foundation, Inc.
+ Copyright 2020-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/step-over-exec.c b/gdb/testsuite/gdb.threads/step-over-exec.c
index 3b1b265..14ea203 100644
--- a/gdb/testsuite/gdb.threads/step-over-exec.c
+++ b/gdb/testsuite/gdb.threads/step-over-exec.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2020-2024 Free Software Foundation, Inc.
+ Copyright 2020-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/step-over-exec.exp b/gdb/testsuite/gdb.threads/step-over-exec.exp
index e5cab9e..b06f3a4 100644
--- a/gdb/testsuite/gdb.threads/step-over-exec.exp
+++ b/gdb/testsuite/gdb.threads/step-over-exec.exp
@@ -1,4 +1,4 @@
-# Copyright 2020-2024 Free Software Foundation, Inc.
+# Copyright 2020-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -71,7 +71,8 @@ proc do_test { execr_thread different_text_segments displaced_stepping } {
return -1
}
- clean_restart ${execr_binfile}
+ clean_restart
+ gdb_load $execr_binfile
gdb_test_no_output "set displaced-stepping $displaced_stepping"
diff --git a/gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.c b/gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.c
index c467e51..37b4f32 100644
--- a/gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.c
+++ b/gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2014-2024 Free Software Foundation, Inc.
+ Copyright 2014-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.exp b/gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.exp
index 88a6f15..65aa2f1 100644
--- a/gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.exp
+++ b/gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2024 Free Software Foundation, Inc.
+# Copyright (C) 2014-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/step-over-thread-exit-while-stop-all-threads.c b/gdb/testsuite/gdb.threads/step-over-thread-exit-while-stop-all-threads.c
index c456bc0..144def6 100644
--- a/gdb/testsuite/gdb.threads/step-over-thread-exit-while-stop-all-threads.c
+++ b/gdb/testsuite/gdb.threads/step-over-thread-exit-while-stop-all-threads.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2021-2024 Free Software Foundation, Inc.
+ Copyright 2021-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/step-over-thread-exit-while-stop-all-threads.exp b/gdb/testsuite/gdb.threads/step-over-thread-exit-while-stop-all-threads.exp
index d37c44f..fdd2b27 100644
--- a/gdb/testsuite/gdb.threads/step-over-thread-exit-while-stop-all-threads.exp
+++ b/gdb/testsuite/gdb.threads/step-over-thread-exit-while-stop-all-threads.exp
@@ -1,4 +1,4 @@
-# Copyright 2021-2024 Free Software Foundation, Inc.
+# Copyright 2021-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -29,7 +29,7 @@ if { [build_executable "failed to prepare" $testfile \
proc test {displaced-stepping target-non-stop} {
save_vars ::GDBFLAGS {
append ::GDBFLAGS " -ex \"maintenance set target-non-stop ${target-non-stop}\""
- clean_restart $::binfile
+ clean_restart $::testfile
}
gdb_test_no_output "set displaced-stepping ${displaced-stepping}"
diff --git a/gdb/testsuite/gdb.threads/step-over-thread-exit.c b/gdb/testsuite/gdb.threads/step-over-thread-exit.c
index df64724..c6a8ff0 100644
--- a/gdb/testsuite/gdb.threads/step-over-thread-exit.c
+++ b/gdb/testsuite/gdb.threads/step-over-thread-exit.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2021-2024 Free Software Foundation, Inc.
+ Copyright 2021-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/step-over-thread-exit.exp b/gdb/testsuite/gdb.threads/step-over-thread-exit.exp
index 98cc94e..8ed2b21 100644
--- a/gdb/testsuite/gdb.threads/step-over-thread-exit.exp
+++ b/gdb/testsuite/gdb.threads/step-over-thread-exit.exp
@@ -1,4 +1,4 @@
-# Copyright 2021-2024 Free Software Foundation, Inc.
+# Copyright 2021-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -55,7 +55,7 @@ proc test {step_over_mode non-stop target-non-stop schedlock cmd ns_stop_all} {
save_vars ::GDBFLAGS {
append ::GDBFLAGS " -ex \"maintenance set target-non-stop ${target-non-stop}\""
append ::GDBFLAGS " -ex \"set non-stop ${non-stop}\""
- clean_restart $::binfile
+ clean_restart $::testfile
}
if { $step_over_mode == "none" } {
diff --git a/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.c b/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.c
index 1266530..f17ce67 100644
--- a/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.c
+++ b/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2014-2024 Free Software Foundation, Inc.
+ Copyright 2014-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp b/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp
index 38444365..9a028fe 100644
--- a/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp
+++ b/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2024 Free Software Foundation, Inc.
+# Copyright (C) 2014-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/stepi-over-clone.c b/gdb/testsuite/gdb.threads/stepi-over-clone.c
index f188853..e2aa2e5 100644
--- a/gdb/testsuite/gdb.threads/stepi-over-clone.c
+++ b/gdb/testsuite/gdb.threads/stepi-over-clone.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2021-2024 Free Software Foundation, Inc.
+ Copyright 2021-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/stepi-over-clone.exp b/gdb/testsuite/gdb.threads/stepi-over-clone.exp
index b93cfe6..d6f1680 100644
--- a/gdb/testsuite/gdb.threads/stepi-over-clone.exp
+++ b/gdb/testsuite/gdb.threads/stepi-over-clone.exp
@@ -1,4 +1,4 @@
-# Copyright 2021-2024 Free Software Foundation, Inc.
+# Copyright 2021-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -106,7 +106,7 @@ proc test {non_stop displaced third_thread} {
save_vars { GDBFLAGS } {
append GDBFLAGS " -ex \"set non-stop $non_stop\""
append GDBFLAGS " -ex \"set displaced $displaced\""
- clean_restart $binfile
+ clean_restart $::testfile
}
runto_main
diff --git a/gdb/testsuite/gdb.threads/stepi-random-signal.c b/gdb/testsuite/gdb.threads/stepi-random-signal.c
index f113cc5..bea43ce 100644
--- a/gdb/testsuite/gdb.threads/stepi-random-signal.c
+++ b/gdb/testsuite/gdb.threads/stepi-random-signal.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2013-2024 Free Software Foundation, Inc.
+ Copyright 2013-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/stepi-random-signal.exp b/gdb/testsuite/gdb.threads/stepi-random-signal.exp
index 5c5229d..8ac81e8 100644
--- a/gdb/testsuite/gdb.threads/stepi-random-signal.exp
+++ b/gdb/testsuite/gdb.threads/stepi-random-signal.exp
@@ -1,4 +1,4 @@
-# Copyright 2013-2024 Free Software Foundation, Inc.
+# Copyright 2013-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/stop-with-handle.c b/gdb/testsuite/gdb.threads/stop-with-handle.c
index bee985d..34fbabc 100644
--- a/gdb/testsuite/gdb.threads/stop-with-handle.c
+++ b/gdb/testsuite/gdb.threads/stop-with-handle.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2019-2024 Free Software Foundation, Inc.
+ Copyright 2019-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/stop-with-handle.exp b/gdb/testsuite/gdb.threads/stop-with-handle.exp
index 3b34ae2..2980449 100644
--- a/gdb/testsuite/gdb.threads/stop-with-handle.exp
+++ b/gdb/testsuite/gdb.threads/stop-with-handle.exp
@@ -1,4 +1,4 @@
-# Copyright 2019-2024 Free Software Foundation, Inc.
+# Copyright 2019-2025 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/switch-threads.c b/gdb/testsuite/gdb.threads/switch-threads.c
index 71001b6..cfc6703 100644
--- a/gdb/testsuite/gdb.threads/switch-threads.c
+++ b/gdb/testsuite/gdb.threads/switch-threads.c
@@ -1,6 +1,6 @@
/* A minimal multi-threaded test case.
- Copyright 2003-2024 Free Software Foundation, Inc.
+ Copyright 2003-2025 Free Software Foundation, Inc.
This file is part of GDB.
diff --git a/gdb/testsuite/gdb.threads/switch-threads.exp b/gdb/testsuite/gdb.threads/switch-threads.exp
index 9cb3435..1f67a45 100644
--- a/gdb/testsuite/gdb.threads/switch-threads.exp
+++ b/gdb/testsuite/gdb.threads/switch-threads.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2024 Free Software Foundation, Inc.
+# Copyright (C) 2003-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -29,7 +29,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
runto_main
diff --git a/gdb/testsuite/gdb.threads/thread-bp-deleted.c b/gdb/testsuite/gdb.threads/thread-bp-deleted.c
index 8efcec0..f1aee80 100644
--- a/gdb/testsuite/gdb.threads/thread-bp-deleted.c
+++ b/gdb/testsuite/gdb.threads/thread-bp-deleted.c
@@ -1,4 +1,4 @@
-/* Copyright 2023-2024 Free Software Foundation, Inc.
+/* Copyright 2023-2025 Free Software Foundation, Inc.
This file is part of GDB.
diff --git a/gdb/testsuite/gdb.threads/thread-bp-deleted.exp b/gdb/testsuite/gdb.threads/thread-bp-deleted.exp
index 3851f8f..8001229 100644
--- a/gdb/testsuite/gdb.threads/thread-bp-deleted.exp
+++ b/gdb/testsuite/gdb.threads/thread-bp-deleted.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2023-2024 Free Software Foundation, Inc.
+# Copyright (C) 2023-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -38,7 +38,7 @@ set is_remote \
# This test requires background execution, which relies on non-stop mode.
save_vars { GDBFLAGS } {
append GDBFLAGS " -ex \"maint set target-non-stop on\""
- clean_restart ${binfile}
+ clean_restart ${::testfile}
}
if {![runto_main]} {
@@ -147,7 +147,7 @@ if {$is_remote} {
exp_continue
}
- -re "No threads match '99'\\.\r\n$gdb_prompt $" {
+ -re "No threads matched\\.\r\n$gdb_prompt $" {
if {!$saw_thread_exited && !$saw_bp_deleted && $attempt_count > 0} {
sleep 1
incr attempt_count -1
diff --git a/gdb/testsuite/gdb.threads/thread-execl.c b/gdb/testsuite/gdb.threads/thread-execl.c
index c6c288c..2d312d4 100644
--- a/gdb/testsuite/gdb.threads/thread-execl.c
+++ b/gdb/testsuite/gdb.threads/thread-execl.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2009-2024 Free Software Foundation, Inc.
+ Copyright 2009-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -25,8 +25,9 @@ static const char *image;
void *
thread_execler (void *arg)
{
- /* Exec ourselves again. */
- if (execl (image, image, NULL) == -1)
+ /* Exec ourselves again. Pass an extra argument so that the
+ post-exec image knows to not re-exec yet again. */
+ if (execl (image, image, "1", NULL) == -1)
{
perror ("execl");
abort ();
@@ -40,6 +41,11 @@ main (int argc, char **argv)
{
pthread_t thread;
+ /* An extra argument means we're in the post-exec image, so we're
+ done. Don't re-exec again. */
+ if (argc > 1)
+ exit (0);
+
image = argv[0];
pthread_create (&thread, NULL, thread_execler, NULL);
diff --git a/gdb/testsuite/gdb.threads/thread-execl.exp b/gdb/testsuite/gdb.threads/thread-execl.exp
index 32c4fcf..13a6ef4 100644
--- a/gdb/testsuite/gdb.threads/thread-execl.exp
+++ b/gdb/testsuite/gdb.threads/thread-execl.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2024 Free Software Foundation, Inc.
+# Copyright (C) 2009-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -35,7 +35,7 @@ proc do_test { schedlock } {
set prefix "schedlock $schedlock"
}
with_test_prefix "$prefix" {
- clean_restart ${binfile}
+ clean_restart ${::testfile}
if {$schedlock == "non-stop"} {
gdb_test_no_output "set non-stop 1"
diff --git a/gdb/testsuite/gdb.threads/thread-find.exp b/gdb/testsuite/gdb.threads/thread-find.exp
index 6bc26bf..171b94b 100644
--- a/gdb/testsuite/gdb.threads/thread-find.exp
+++ b/gdb/testsuite/gdb.threads/thread-find.exp
@@ -1,4 +1,4 @@
-# Copyright 2011-2024 Free Software Foundation, Inc.
+# Copyright 2011-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
gdb_test_no_output "set print sevenbit-strings"
runto_main
diff --git a/gdb/testsuite/gdb.threads/thread-specific-bp.c b/gdb/testsuite/gdb.threads/thread-specific-bp.c
index 66105af..425eb5a 100644
--- a/gdb/testsuite/gdb.threads/thread-specific-bp.c
+++ b/gdb/testsuite/gdb.threads/thread-specific-bp.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2013-2024 Free Software Foundation, Inc.
+ Copyright 2013-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/thread-specific-bp.exp b/gdb/testsuite/gdb.threads/thread-specific-bp.exp
index e7641d2..8f48b61 100644
--- a/gdb/testsuite/gdb.threads/thread-specific-bp.exp
+++ b/gdb/testsuite/gdb.threads/thread-specific-bp.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2024 Free Software Foundation, Inc.
+# Copyright (C) 2013-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -118,7 +118,7 @@ proc check_thread_specific_breakpoint {non_stop} {
foreach_with_prefix non_stop {on off} {
save_vars { GDBFLAGS } {
append GDBFLAGS " -ex \"set non-stop $non_stop\""
- clean_restart $binfile
+ clean_restart $::testfile
}
check_thread_specific_breakpoint $non_stop
diff --git a/gdb/testsuite/gdb.threads/thread-specific.c b/gdb/testsuite/gdb.threads/thread-specific.c
index 179f6f7..e680251 100644
--- a/gdb/testsuite/gdb.threads/thread-specific.c
+++ b/gdb/testsuite/gdb.threads/thread-specific.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2004-2024 Free Software Foundation, Inc.
+ Copyright 2004-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/thread-specific.exp b/gdb/testsuite/gdb.threads/thread-specific.exp
index 26bba8b..d1e6f4d 100644
--- a/gdb/testsuite/gdb.threads/thread-specific.exp
+++ b/gdb/testsuite/gdb.threads/thread-specific.exp
@@ -1,4 +1,4 @@
-# Copyright 2004-2024 Free Software Foundation, Inc.
+# Copyright 2004-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -62,7 +62,7 @@ proc get_thread_list { } {
return $thr_list
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
gdb_test_no_output "set print sevenbit-strings"
gdb_test_no_output "set width 0"
diff --git a/gdb/testsuite/gdb.threads/thread-unwindonsignal.exp b/gdb/testsuite/gdb.threads/thread-unwindonsignal.exp
index 11d9fb2..dc74714 100644
--- a/gdb/testsuite/gdb.threads/thread-unwindonsignal.exp
+++ b/gdb/testsuite/gdb.threads/thread-unwindonsignal.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2024 Free Software Foundation, Inc.
+# Copyright (C) 2008-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
if { ![runto_main] } {
return 0
diff --git a/gdb/testsuite/gdb.threads/thread_check.c b/gdb/testsuite/gdb.threads/thread_check.c
index 1958410..2863f0a 100644
--- a/gdb/testsuite/gdb.threads/thread_check.c
+++ b/gdb/testsuite/gdb.threads/thread_check.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004-2024 Free Software Foundation, Inc.
+/* Copyright (C) 2004-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/thread_check.exp b/gdb/testsuite/gdb.threads/thread_check.exp
index 658f15e..9f92066 100644
--- a/gdb/testsuite/gdb.threads/thread_check.exp
+++ b/gdb/testsuite/gdb.threads/thread_check.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2024 Free Software Foundation, Inc.
+# Copyright (C) 2004-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -39,7 +39,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
if {![runto_main]} {
return 1
diff --git a/gdb/testsuite/gdb.threads/thread_events.c b/gdb/testsuite/gdb.threads/thread_events.c
index 598633b..d7a6c09 100644
--- a/gdb/testsuite/gdb.threads/thread_events.c
+++ b/gdb/testsuite/gdb.threads/thread_events.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2024 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/thread_events.exp b/gdb/testsuite/gdb.threads/thread_events.exp
index ca51abe..91539e0 100644
--- a/gdb/testsuite/gdb.threads/thread_events.exp
+++ b/gdb/testsuite/gdb.threads/thread_events.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2024 Free Software Foundation, Inc.
+# Copyright (C) 2007-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/threadapply.c b/gdb/testsuite/gdb.threads/threadapply.c
index d21974d..5dccaa4 100644
--- a/gdb/testsuite/gdb.threads/threadapply.c
+++ b/gdb/testsuite/gdb.threads/threadapply.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2002-2024 Free Software Foundation, Inc.
+ Copyright 2002-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/threadapply.exp b/gdb/testsuite/gdb.threads/threadapply.exp
index df72909..34de561 100644
--- a/gdb/testsuite/gdb.threads/threadapply.exp
+++ b/gdb/testsuite/gdb.threads/threadapply.exp
@@ -1,6 +1,6 @@
# This testcase is part of GDB, the GNU debugger.
-# Copyright 2004-2024 Free Software Foundation, Inc.
+# Copyright 2004-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
#
# Run to `main' where we begin our tests.
@@ -73,7 +73,7 @@ proc thr_apply_detach {thread_set} {
global binfile
global break_line
- clean_restart ${binfile}
+ clean_restart ${::testfile}
if ![runto_main] {
return -1
@@ -112,7 +112,7 @@ proc kill_and_remove_inferior {thread_set} {
set any "\[^\r\n\]*"
set ws "\[ \t\]\+"
- clean_restart ${binfile}
+ clean_restart ${::testfile}
with_test_prefix "start inferior 1" {
runto_main
@@ -224,6 +224,8 @@ proc kill_and_remove_inferior {thread_set} {
# Test both "all" and a thread list, because those are implemented as
# different commands in GDB.
-foreach_with_prefix thread_set {"all" "1.1"} {
- kill_and_remove_inferior $thread_set
+if {[allow_multi_inferior_tests]} {
+ foreach_with_prefix thread_set {"all" "1.1"} {
+ kill_and_remove_inferior $thread_set
+ }
}
diff --git a/gdb/testsuite/gdb.threads/threadcrash.c b/gdb/testsuite/gdb.threads/threadcrash.c
index e476ae7..4109340 100644
--- a/gdb/testsuite/gdb.threads/threadcrash.c
+++ b/gdb/testsuite/gdb.threads/threadcrash.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2023 Free Software Foundation, Inc.
+ Copyright 2023-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/threadcrash.exp b/gdb/testsuite/gdb.threads/threadcrash.exp
index 6da7073..76d2c6c 100644
--- a/gdb/testsuite/gdb.threads/threadcrash.exp
+++ b/gdb/testsuite/gdb.threads/threadcrash.exp
@@ -1,6 +1,6 @@
# This testcase is part of GDB, the GNU debugger.
-# Copyright 2023 Free Software Foundation, Inc.
+# Copyright 2023-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -237,7 +237,7 @@ proc_with_prefix test_corefile {} {
proc_with_prefix test_gcore {} {
- clean_restart "$::binfile"
+ clean_restart "$::testfile"
gdb_test "handle SIGUSR1 nostop print pass" \
".*SIGUSR1.*No.*Yes.*Yes.*User defined signal 1" \
@@ -275,7 +275,7 @@ if [prepare_for_testing "failed to prepare" $testfile $srcfile \
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
gdb_test_no_output "set backtrace limit unlimited"
diff --git a/gdb/testsuite/gdb.threads/threads-after-exec.c b/gdb/testsuite/gdb.threads/threads-after-exec.c
index 1278e48..feb44d3 100644
--- a/gdb/testsuite/gdb.threads/threads-after-exec.c
+++ b/gdb/testsuite/gdb.threads/threads-after-exec.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2023-2024 Free Software Foundation, Inc.
+ Copyright 2023-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/threads-after-exec.exp b/gdb/testsuite/gdb.threads/threads-after-exec.exp
index 32aec6b..db26315 100644
--- a/gdb/testsuite/gdb.threads/threads-after-exec.exp
+++ b/gdb/testsuite/gdb.threads/threads-after-exec.exp
@@ -1,4 +1,4 @@
-# Copyright 2023-2024 Free Software Foundation, Inc.
+# Copyright 2023-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/threxit-hop-specific.c b/gdb/testsuite/gdb.threads/threxit-hop-specific.c
index 1cbb1d2..afc887a 100644
--- a/gdb/testsuite/gdb.threads/threxit-hop-specific.c
+++ b/gdb/testsuite/gdb.threads/threxit-hop-specific.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2009-2024 Free Software Foundation, Inc.
+ Copyright 2009-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/threxit-hop-specific.exp b/gdb/testsuite/gdb.threads/threxit-hop-specific.exp
index fc6a787..b55e80c 100644
--- a/gdb/testsuite/gdb.threads/threxit-hop-specific.exp
+++ b/gdb/testsuite/gdb.threads/threxit-hop-specific.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2024 Free Software Foundation, Inc.
+# Copyright (C) 2009-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
runto_main
diff --git a/gdb/testsuite/gdb.threads/tid-reuse.c b/gdb/testsuite/gdb.threads/tid-reuse.c
index e8fb778..041a285 100644
--- a/gdb/testsuite/gdb.threads/tid-reuse.c
+++ b/gdb/testsuite/gdb.threads/tid-reuse.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2015-2024 Free Software Foundation, Inc.
+ Copyright 2015-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/tid-reuse.exp b/gdb/testsuite/gdb.threads/tid-reuse.exp
index f89185c..6762127 100644
--- a/gdb/testsuite/gdb.threads/tid-reuse.exp
+++ b/gdb/testsuite/gdb.threads/tid-reuse.exp
@@ -1,4 +1,4 @@
-# Copyright 2015-2024 Free Software Foundation, Inc.
+# Copyright 2015-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/tls-core.c b/gdb/testsuite/gdb.threads/tls-core.c
index a645575..b748369 100644
--- a/gdb/testsuite/gdb.threads/tls-core.c
+++ b/gdb/testsuite/gdb.threads/tls-core.c
@@ -1,6 +1,6 @@
/* This test is part of GDB, the GNU debugger.
- Copyright 2017-2024 Free Software Foundation, Inc.
+ Copyright 2017-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/tls-core.exp b/gdb/testsuite/gdb.threads/tls-core.exp
index 32433f5..587ae61 100644
--- a/gdb/testsuite/gdb.threads/tls-core.exp
+++ b/gdb/testsuite/gdb.threads/tls-core.exp
@@ -1,4 +1,4 @@
-# Copyright 2017-2024 Free Software Foundation, Inc.
+# Copyright 2017-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@ set core_supported [expr {$corefile != ""}]
# Generate a core file with "gcore".
-clean_restart ${binfile}
+clean_restart ${::testfile}
runto thread_proc
@@ -43,7 +43,7 @@ proc tls_core_test {supported corefile} {
upvar host_triplet host_triplet
upvar binfile binfile
- clean_restart ${binfile}
+ clean_restart ${::testfile}
set test "load core file"
if {$supported} {
diff --git a/gdb/testsuite/gdb.threads/tls-nodebug-pie.c b/gdb/testsuite/gdb.threads/tls-nodebug-pie.c
index 4dac62e..c86a95a 100644
--- a/gdb/testsuite/gdb.threads/tls-nodebug-pie.c
+++ b/gdb/testsuite/gdb.threads/tls-nodebug-pie.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2016-2024 Free Software Foundation, Inc.
+ Copyright 2016-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/tls-nodebug-pie.exp b/gdb/testsuite/gdb.threads/tls-nodebug-pie.exp
index c5a7f66..44c12f5 100644
--- a/gdb/testsuite/gdb.threads/tls-nodebug-pie.exp
+++ b/gdb/testsuite/gdb.threads/tls-nodebug-pie.exp
@@ -1,4 +1,4 @@
-# Copyright 2016-2024 Free Software Foundation, Inc.
+# Copyright 2016-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.threads/tls-nodebug.exp b/gdb/testsuite/gdb.threads/tls-nodebug.exp
index c78623d..971f26c 100644
--- a/gdb/testsuite/gdb.threads/tls-nodebug.exp
+++ b/gdb/testsuite/gdb.threads/tls-nodebug.exp
@@ -1,5 +1,5 @@
# tls.exp -- Expect script to test thread-local storage without debuginfo
-# Copyright (C) 2006-2024 Free Software Foundation, Inc.
+# Copyright (C) 2006-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.threads/tls-sepdebug-main.c b/gdb/testsuite/gdb.threads/tls-sepdebug-main.c
index c48923f..9287f16 100644
--- a/gdb/testsuite/gdb.threads/tls-sepdebug-main.c
+++ b/gdb/testsuite/gdb.threads/tls-sepdebug-main.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2006-2024 Free Software Foundation, Inc.
+ Copyright 2006-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c b/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c
index 8178f5c..201697b 100644
--- a/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c
+++ b/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2006-2024 Free Software Foundation, Inc.
+ Copyright 2006-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/tls-sepdebug.exp b/gdb/testsuite/gdb.threads/tls-sepdebug.exp
index 4a322e0..6f3c711 100644
--- a/gdb/testsuite/gdb.threads/tls-sepdebug.exp
+++ b/gdb/testsuite/gdb.threads/tls-sepdebug.exp
@@ -1,4 +1,4 @@
-# Copyright 2006-2024 Free Software Foundation, Inc.
+# Copyright 2006-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/tls-shared.exp b/gdb/testsuite/gdb.threads/tls-shared.exp
index 9d39686..b7fa965 100644
--- a/gdb/testsuite/gdb.threads/tls-shared.exp
+++ b/gdb/testsuite/gdb.threads/tls-shared.exp
@@ -1,4 +1,4 @@
-# Copyright 2003-2024 Free Software Foundation, Inc.
+# Copyright 2003-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -29,7 +29,7 @@ if { [gdb_compile_shlib_pthreads ${srcdir}/${subdir}/${srcfile_lib} ${binfile_li
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
gdb_load_shlib ${binfile_lib}
if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.threads/tls-so_extern.c b/gdb/testsuite/gdb.threads/tls-so_extern.c
index be1cf59..cc7af64 100644
--- a/gdb/testsuite/gdb.threads/tls-so_extern.c
+++ b/gdb/testsuite/gdb.threads/tls-so_extern.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2015-2024 Free Software Foundation, Inc.
+ Copyright 2015-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/tls-so_extern.exp b/gdb/testsuite/gdb.threads/tls-so_extern.exp
index 6bc5572..a0aa5f8 100644
--- a/gdb/testsuite/gdb.threads/tls-so_extern.exp
+++ b/gdb/testsuite/gdb.threads/tls-so_extern.exp
@@ -1,4 +1,4 @@
-# Copyright 2003-2024 Free Software Foundation, Inc.
+# Copyright 2003-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ if { [gdb_compile_shlib_pthreads ${srcdir}/${subdir}/${srcfile_lib} ${binfile_li
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
gdb_load_shlib ${binfile_lib}
if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.threads/tls-so_extern_main.c b/gdb/testsuite/gdb.threads/tls-so_extern_main.c
index 3dc806f..9829d7a 100644
--- a/gdb/testsuite/gdb.threads/tls-so_extern_main.c
+++ b/gdb/testsuite/gdb.threads/tls-so_extern_main.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2015-2024 Free Software Foundation, Inc.
+ Copyright 2015-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/tls-var-main.c b/gdb/testsuite/gdb.threads/tls-var-main.c
index ef744b7..9b8f057 100644
--- a/gdb/testsuite/gdb.threads/tls-var-main.c
+++ b/gdb/testsuite/gdb.threads/tls-var-main.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2011-2024 Free Software Foundation, Inc.
+ Copyright 2011-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/tls-var.c b/gdb/testsuite/gdb.threads/tls-var.c
index 448135e..5be9be9 100644
--- a/gdb/testsuite/gdb.threads/tls-var.c
+++ b/gdb/testsuite/gdb.threads/tls-var.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2011-2024 Free Software Foundation, Inc.
+ Copyright 2011-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/tls-var.exp b/gdb/testsuite/gdb.threads/tls-var.exp
index cd56dcd..de74bd9 100644
--- a/gdb/testsuite/gdb.threads/tls-var.exp
+++ b/gdb/testsuite/gdb.threads/tls-var.exp
@@ -1,4 +1,4 @@
-# Copyright 2011-2024 Free Software Foundation, Inc.
+# Copyright 2011-2025 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/tls.exp b/gdb/testsuite/gdb.threads/tls.exp
index c6fdb6f..4b43387 100644
--- a/gdb/testsuite/gdb.threads/tls.exp
+++ b/gdb/testsuite/gdb.threads/tls.exp
@@ -1,5 +1,5 @@
# tls.exp -- Expect script to test thread-local storage
-# Copyright (C) 1992-2024 Free Software Foundation, Inc.
+# Copyright (C) 1992-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -153,13 +153,13 @@ proc check_thread_stack {number spin_threads spin_threads_level} {
}
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
gdb_test_multiple "print a_thread_local" "" {
-re -wrap "Cannot find thread-local variables on this target" {
kfail "gdb/25807" $gdb_test_name
}
- -re -wrap "Cannot read .a_thread_local. without registers" {
+ -re -wrap "Cannot (?:read|find address of TLS symbol) .a_thread_local. without registers" {
pass $gdb_test_name
}
}
diff --git a/gdb/testsuite/gdb.threads/tls2.c b/gdb/testsuite/gdb.threads/tls2.c
index f4d7177..4d1b685 100644
--- a/gdb/testsuite/gdb.threads/tls2.c
+++ b/gdb/testsuite/gdb.threads/tls2.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2008-2024 Free Software Foundation, Inc.
+ Copyright 2008-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/vfork-follow-child-exec.c b/gdb/testsuite/gdb.threads/vfork-follow-child-exec.c
index 7340073..9bad522 100644
--- a/gdb/testsuite/gdb.threads/vfork-follow-child-exec.c
+++ b/gdb/testsuite/gdb.threads/vfork-follow-child-exec.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2019-2024 Free Software Foundation, Inc.
+ Copyright 2019-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/vfork-follow-child-exec.exp b/gdb/testsuite/gdb.threads/vfork-follow-child-exec.exp
index 9c47308..7c2b309 100644
--- a/gdb/testsuite/gdb.threads/vfork-follow-child-exec.exp
+++ b/gdb/testsuite/gdb.threads/vfork-follow-child-exec.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2019-2024 Free Software Foundation, Inc.
+# Copyright (C) 2019-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,6 +16,8 @@
# Test following a vfork child that execs, when the vfork parent is a
# threaded program, and it's a non-main thread that vforks.
+require allow_fork_tests
+
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile {debug pthreads}]} {
@@ -28,7 +30,7 @@ if {[build_executable "failed to prepare" $testfile $srcfile {debug pthreads}]}
proc test_vfork {detach} {
global binfile
- clean_restart $binfile
+ clean_restart $::testfile
if {![runto_main]} {
return 0
diff --git a/gdb/testsuite/gdb.threads/vfork-follow-child-exit.c b/gdb/testsuite/gdb.threads/vfork-follow-child-exit.c
index fce9b92..ad972a1 100644
--- a/gdb/testsuite/gdb.threads/vfork-follow-child-exit.c
+++ b/gdb/testsuite/gdb.threads/vfork-follow-child-exit.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2019-2024 Free Software Foundation, Inc.
+ Copyright 2019-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/vfork-follow-child-exit.exp b/gdb/testsuite/gdb.threads/vfork-follow-child-exit.exp
index e593b6c..a5e7475 100644
--- a/gdb/testsuite/gdb.threads/vfork-follow-child-exit.exp
+++ b/gdb/testsuite/gdb.threads/vfork-follow-child-exit.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2019-2024 Free Software Foundation, Inc.
+# Copyright (C) 2019-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,6 +16,8 @@
# Test following a vfork child that exits, when the vfork parent is a
# threaded program, and it's a non-main thread that vforks.
+require allow_fork_tests
+
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile {debug pthreads}]} {
@@ -28,7 +30,7 @@ if {[build_executable "failed to prepare" $testfile $srcfile {debug pthreads}]}
proc test_vfork {detach} {
global binfile
- clean_restart $binfile
+ clean_restart $::testfile
if {![runto_main]} {
return 0
diff --git a/gdb/testsuite/gdb.threads/vfork-multi-inferior-sleep.c b/gdb/testsuite/gdb.threads/vfork-multi-inferior-sleep.c
index c416e99..58e5c3f 100644
--- a/gdb/testsuite/gdb.threads/vfork-multi-inferior-sleep.c
+++ b/gdb/testsuite/gdb.threads/vfork-multi-inferior-sleep.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2022-2024 Free Software Foundation, Inc.
+ Copyright 2022-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/vfork-multi-inferior.c b/gdb/testsuite/gdb.threads/vfork-multi-inferior.c
index ae0aab0..e62f1ec 100644
--- a/gdb/testsuite/gdb.threads/vfork-multi-inferior.c
+++ b/gdb/testsuite/gdb.threads/vfork-multi-inferior.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2022-2024 Free Software Foundation, Inc.
+ Copyright 2022-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/vfork-multi-inferior.exp b/gdb/testsuite/gdb.threads/vfork-multi-inferior.exp
index 4b45ee8..1f87427 100644
--- a/gdb/testsuite/gdb.threads/vfork-multi-inferior.exp
+++ b/gdb/testsuite/gdb.threads/vfork-multi-inferior.exp
@@ -1,4 +1,4 @@
-# Copyright 2020-2024 Free Software Foundation, Inc.
+# Copyright 2020-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -25,6 +25,10 @@
# To catch the bug, this test verifies that we can hit a breakpoint after a
# vfork call, while a second inferior runs in the background.
+require allow_fork_tests
+
+require allow_multi_inferior_tests
+
require !use_gdb_stub
standard_testfile .c -sleep.c
diff --git a/gdb/testsuite/gdb.threads/vfork-multi-thread.c b/gdb/testsuite/gdb.threads/vfork-multi-thread.c
index 0818868..0bc8575 100644
--- a/gdb/testsuite/gdb.threads/vfork-multi-thread.c
+++ b/gdb/testsuite/gdb.threads/vfork-multi-thread.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2022-2024 Free Software Foundation, Inc.
+ Copyright 2022-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/vfork-multi-thread.exp b/gdb/testsuite/gdb.threads/vfork-multi-thread.exp
index 59e0298..fce974b 100644
--- a/gdb/testsuite/gdb.threads/vfork-multi-thread.exp
+++ b/gdb/testsuite/gdb.threads/vfork-multi-thread.exp
@@ -1,4 +1,4 @@
-# Copyright 2022-2024 Free Software Foundation, Inc.
+# Copyright 2022-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -30,6 +30,8 @@
# breakpoints are removed, so the main thread would miss the breakpoint and run
# until exit.
+require allow_fork_tests
+
standard_testfile
if { [build_executable "failed to prepare" ${testfile} ${srcfile} {debug pthreads}] } {
@@ -57,7 +59,7 @@ proc do_test { target-non-stop non-stop follow-fork-mode detach-on-fork schedule
save_vars { ::GDBFLAGS } {
append ::GDBFLAGS " -ex \"maintenance set target-non-stop ${target-non-stop}\""
append ::GDBFLAGS " -ex \"set non-stop ${non-stop}\""
- clean_restart ${::binfile}
+ clean_restart ${::testfile}
}
gdb_test_no_output "set follow-fork-mode ${follow-fork-mode}"
diff --git a/gdb/testsuite/gdb.threads/watchpoint-fork-child.c b/gdb/testsuite/gdb.threads/watchpoint-fork-child.c
index 8562b42..0fa3686 100644
--- a/gdb/testsuite/gdb.threads/watchpoint-fork-child.c
+++ b/gdb/testsuite/gdb.threads/watchpoint-fork-child.c
@@ -1,6 +1,6 @@
/* Test case for forgotten hw-watchpoints after fork()-off of a process.
- Copyright 2012-2024 Free Software Foundation, Inc.
+ Copyright 2012-2025 Free Software Foundation, Inc.
This file is part of GDB.
diff --git a/gdb/testsuite/gdb.threads/watchpoint-fork-mt.c b/gdb/testsuite/gdb.threads/watchpoint-fork-mt.c
index eb65d45..0919b95 100644
--- a/gdb/testsuite/gdb.threads/watchpoint-fork-mt.c
+++ b/gdb/testsuite/gdb.threads/watchpoint-fork-mt.c
@@ -1,6 +1,6 @@
/* Test case for forgotten hw-watchpoints after fork()-off of a process.
- Copyright 2012-2024 Free Software Foundation, Inc.
+ Copyright 2012-2025 Free Software Foundation, Inc.
This file is part of GDB.
diff --git a/gdb/testsuite/gdb.threads/watchpoint-fork-parent.c b/gdb/testsuite/gdb.threads/watchpoint-fork-parent.c
index 02c2c11..229d775 100644
--- a/gdb/testsuite/gdb.threads/watchpoint-fork-parent.c
+++ b/gdb/testsuite/gdb.threads/watchpoint-fork-parent.c
@@ -1,6 +1,6 @@
/* Test case for forgotten hw-watchpoints after fork()-off of a process.
- Copyright 2012-2024 Free Software Foundation, Inc.
+ Copyright 2012-2025 Free Software Foundation, Inc.
This file is part of GDB.
diff --git a/gdb/testsuite/gdb.threads/watchpoint-fork-st.c b/gdb/testsuite/gdb.threads/watchpoint-fork-st.c
index 42d2192..5438503 100644
--- a/gdb/testsuite/gdb.threads/watchpoint-fork-st.c
+++ b/gdb/testsuite/gdb.threads/watchpoint-fork-st.c
@@ -1,6 +1,6 @@
/* Test case for forgotten hw-watchpoints after fork()-off of a process.
- Copyright 2012-2024 Free Software Foundation, Inc.
+ Copyright 2012-2025 Free Software Foundation, Inc.
This file is part of GDB.
diff --git a/gdb/testsuite/gdb.threads/watchpoint-fork.exp b/gdb/testsuite/gdb.threads/watchpoint-fork.exp
index b9f21b5..8e9b1c3 100644
--- a/gdb/testsuite/gdb.threads/watchpoint-fork.exp
+++ b/gdb/testsuite/gdb.threads/watchpoint-fork.exp
@@ -1,4 +1,4 @@
-# Copyright 2012-2024 Free Software Foundation, Inc.
+# Copyright 2012-2025 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,6 +21,8 @@
# must be done before starting the test so as to not disrupt the execution
# of the actual test.
+require allow_fork_tests
+
set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests]
set testfile watchpoint-fork
diff --git a/gdb/testsuite/gdb.threads/watchpoint-fork.h b/gdb/testsuite/gdb.threads/watchpoint-fork.h
index b46db7f..50cf36c 100644
--- a/gdb/testsuite/gdb.threads/watchpoint-fork.h
+++ b/gdb/testsuite/gdb.threads/watchpoint-fork.h
@@ -1,6 +1,6 @@
/* Test case for forgotten hw-watchpoints after fork()-off of a process.
- Copyright 2012-2024 Free Software Foundation, Inc.
+ Copyright 2012-2025 Free Software Foundation, Inc.
This file is part of GDB.
diff --git a/gdb/testsuite/gdb.threads/watchthreads-reorder.c b/gdb/testsuite/gdb.threads/watchthreads-reorder.c
index 056d38e..82ab14d 100644
--- a/gdb/testsuite/gdb.threads/watchthreads-reorder.c
+++ b/gdb/testsuite/gdb.threads/watchthreads-reorder.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2009-2024 Free Software Foundation, Inc.
+ Copyright 2009-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/watchthreads-reorder.exp b/gdb/testsuite/gdb.threads/watchthreads-reorder.exp
index 00e532b..5d98913 100644
--- a/gdb/testsuite/gdb.threads/watchthreads-reorder.exp
+++ b/gdb/testsuite/gdb.threads/watchthreads-reorder.exp
@@ -1,6 +1,6 @@
# This testcase is part of GDB, the GNU debugger.
-# Copyright 2009-2024 Free Software Foundation, Inc.
+# Copyright 2009-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/watchthreads.c b/gdb/testsuite/gdb.threads/watchthreads.c
index 2b0bdbc..0c2877d 100644
--- a/gdb/testsuite/gdb.threads/watchthreads.c
+++ b/gdb/testsuite/gdb.threads/watchthreads.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2002-2024 Free Software Foundation, Inc.
+ Copyright 2002-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/watchthreads.exp b/gdb/testsuite/gdb.threads/watchthreads.exp
index 3adec13..f3ec7f4 100644
--- a/gdb/testsuite/gdb.threads/watchthreads.exp
+++ b/gdb/testsuite/gdb.threads/watchthreads.exp
@@ -1,6 +1,6 @@
# This testcase is part of GDB, the GNU debugger.
-# Copyright 2004-2024 Free Software Foundation, Inc.
+# Copyright 2004-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
return -1
}
-clean_restart $binfile
+clean_restart $::testfile
gdb_test_no_output "set can-use-hw-watchpoints 1" ""
#
diff --git a/gdb/testsuite/gdb.threads/watchthreads2.c b/gdb/testsuite/gdb.threads/watchthreads2.c
index dddad19..ee67566 100644
--- a/gdb/testsuite/gdb.threads/watchthreads2.c
+++ b/gdb/testsuite/gdb.threads/watchthreads2.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2009-2024 Free Software Foundation, Inc.
+ Copyright 2009-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/watchthreads2.exp b/gdb/testsuite/gdb.threads/watchthreads2.exp
index ee97bfe..19a60e4 100644
--- a/gdb/testsuite/gdb.threads/watchthreads2.exp
+++ b/gdb/testsuite/gdb.threads/watchthreads2.exp
@@ -1,6 +1,6 @@
# This testcase is part of GDB, the GNU debugger.
-# Copyright 2009-2024 Free Software Foundation, Inc.
+# Copyright 2009-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
gdb_test_no_output "set can-use-hw-watchpoints 1" ""
diff --git a/gdb/testsuite/gdb.threads/wp-replication.c b/gdb/testsuite/gdb.threads/wp-replication.c
index 0629a7e..d37d3e0 100644
--- a/gdb/testsuite/gdb.threads/wp-replication.c
+++ b/gdb/testsuite/gdb.threads/wp-replication.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2009-2024 Free Software Foundation, Inc.
+ Copyright 2009-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.threads/wp-replication.exp b/gdb/testsuite/gdb.threads/wp-replication.exp
index b73c6c5..8a5f95d 100644
--- a/gdb/testsuite/gdb.threads/wp-replication.exp
+++ b/gdb/testsuite/gdb.threads/wp-replication.exp
@@ -1,6 +1,6 @@
# This testcase is part of GDB, the GNU debugger.
-# Copyright 2009-2024 Free Software Foundation, Inc.
+# Copyright 2009-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -34,7 +34,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
# Force hardware watchpoints to be used.
gdb_test_no_output "set can-use-hw-watchpoints 1" ""