aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.multi/multi-target-thread-find.exp
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2024-03-22 17:29:47 -0700
committerJohn Baldwin <jhb@FreeBSD.org>2024-03-22 17:29:47 -0700
commit467a34bb9e61dfaddf7209e04455a21600b6ef5f (patch)
treef04e6982144f9f2b5b32c3dce9363b80ad2594e9 /gdb/testsuite/gdb.multi/multi-target-thread-find.exp
parentefd58a4379a59583e8fea46f5b547c5d5c1f1a04 (diff)
downloadgdb-467a34bb9e61dfaddf7209e04455a21600b6ef5f.zip
gdb-467a34bb9e61dfaddf7209e04455a21600b6ef5f.tar.gz
gdb-467a34bb9e61dfaddf7209e04455a21600b6ef5f.tar.bz2
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").
Diffstat (limited to 'gdb/testsuite/gdb.multi/multi-target-thread-find.exp')
-rw-r--r--gdb/testsuite/gdb.multi/multi-target-thread-find.exp2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.multi/multi-target-thread-find.exp b/gdb/testsuite/gdb.multi/multi-target-thread-find.exp
index e07c5c4..ee6df54 100644
--- a/gdb/testsuite/gdb.multi/multi-target-thread-find.exp
+++ b/gdb/testsuite/gdb.multi/multi-target-thread-find.exp
@@ -50,7 +50,7 @@ proc test_thread_find {} {
}
set any "\[^\r\n\]*"
gdb_test_multiple "info threads" "collect thread id" {
- -re ". ($decimal).$decimal (Thread ${any}) \"threadname_\[0-9\]+\" $any" {
+ -re ". ($decimal).$decimal (${tdlabel_re} ${any}) \"threadname_\[0-9\]+\" $any" {
set thr_num $expect_out(1,string)
set target_id($thr_num) $expect_out(2,string)
exp_continue