]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb tests: Allow for "LWP" or "process" in thread IDs from info threads
authorJohn Baldwin <jhb@FreeBSD.org>
Sat, 23 Mar 2024 00:29:47 +0000 (17:29 -0700)
committerJohn Baldwin <jhb@FreeBSD.org>
Sat, 23 Mar 2024 00:29:47 +0000 (17:29 -0700)
commit467a34bb9e61dfaddf7209e04455a21600b6ef5f
treef04e6982144f9f2b5b32c3dce9363b80ad2594e9
parentefd58a4379a59583e8fea46f5b547c5d5c1f1a04
gdb tests: Allow for "LWP" or "process" in thread IDs from info threads

Several tests assume that the first word after a thread ID in 'info
threads' output is "Thread".  However, several targets use "LWP"
instead such as the FreeBSD and NetBSD native targets.  The Linux
native target also uses "LWP" if libthread_db is not being used.
Targets that do not support threads use "process" as the first word
via normal_pid_to_str.

Add a tdlabel_re global variable as a regular-expression for a thread
label in `info threads' that matches either "process", "Thread", or
"LWP".

Some other tests in the tree don't require a specific word, and
some targets may use other first words (e.g. OpenBSD uses "thread"
and Ravenscar threads use "Ravenscar Thread").
24 files changed:
gdb/testsuite/gdb.multi/multi-target-thread-find.exp
gdb/testsuite/gdb.python/py-thrhandle.exp
gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp
gdb/testsuite/gdb.threads/execl.exp
gdb/testsuite/gdb.threads/fork-child-threads.exp
gdb/testsuite/gdb.threads/fork-thread-pending.exp
gdb/testsuite/gdb.threads/info-threads-cur-sal.exp
gdb/testsuite/gdb.threads/interrupt-while-step-over.exp
gdb/testsuite/gdb.threads/leader-exit.exp
gdb/testsuite/gdb.threads/manythreads.exp
gdb/testsuite/gdb.threads/no-unwaited-for-left.exp
gdb/testsuite/gdb.threads/non-ldr-exc-2.exp
gdb/testsuite/gdb.threads/pthreads.exp
gdb/testsuite/gdb.threads/signal-command-handle-nopass.exp
gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.exp
gdb/testsuite/gdb.threads/signal-delivered-right-thread.exp
gdb/testsuite/gdb.threads/signal-sigtrap.exp
gdb/testsuite/gdb.threads/staticthreads.exp
gdb/testsuite/gdb.threads/thread-specific-bp.exp
gdb/testsuite/gdb.threads/thread-specific.exp
gdb/testsuite/gdb.threads/tls.exp
gdb/testsuite/gdb.trace/report.exp
gdb/testsuite/gdb.trace/strace.exp
gdb/testsuite/lib/gdb.exp