diff options
author | Tom Tromey <tromey@redhat.com> | 2010-12-21 19:10:15 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2010-12-21 19:10:15 +0000 |
commit | a7658b96f67e54d6579cb145677d19ae7ac93619 (patch) | |
tree | 4c0aceae9380de2753ed6ae6ce683e0ee59a55bb /gdb/testsuite | |
parent | c91a930cb775123c1dcdfc3f9366bd3e21d2c5e5 (diff) | |
download | gdb-a7658b96f67e54d6579cb145677d19ae7ac93619.zip gdb-a7658b96f67e54d6579cb145677d19ae7ac93619.tar.gz gdb-a7658b96f67e54d6579cb145677d19ae7ac93619.tar.bz2 |
gdb
* thread.c (print_thread_info): Make a ui-out table in CLI mode.
gdb/testsuite
* gdb.threads/execl.exp: Update.
* gdb.threads/linux-dp.exp: Update.
* gdb.threads/manythreads.exp: Update.
* gdb.threads/tls.exp: Update.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/testsuite/gdb.threads/execl.exp | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.threads/linux-dp.exp | 18 | ||||
-rw-r--r-- | gdb/testsuite/gdb.threads/manythreads.exp | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.threads/tls.exp | 6 |
5 files changed, 24 insertions, 11 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 9947918..df8e1fe 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2010-12-21 Tom Tromey <tromey@redhat.com> + + * gdb.threads/execl.exp: Update. + * gdb.threads/linux-dp.exp: Update. + * gdb.threads/manythreads.exp: Update. + * gdb.threads/tls.exp: Update. + 2010-12-15 Jan Kratochvil <jan.kratochvil@redhat.com> * gdb.cp/nextoverthrow.cc (dummy): Return int 0. diff --git a/gdb/testsuite/gdb.threads/execl.exp b/gdb/testsuite/gdb.threads/execl.exp index cd4a801..9cafeda 100644 --- a/gdb/testsuite/gdb.threads/execl.exp +++ b/gdb/testsuite/gdb.threads/execl.exp @@ -46,7 +46,7 @@ gdb_test "b [gdb_get_line_number "breakpoint here"]" \ gdb_test "continue" ".*breakpoint here.*" "continue to exec" -gdb_test "info threads" ".*3 Thread.*2 Thread.*1 Thread.*" "info threads before exec" +gdb_test "info threads" ".*3 *Thread.*2 *Thread.*1 *Thread.*" "info threads before exec" # When continuing from this point we'll hit the breakpoint in main() # again, this time in the exec'd process. diff --git a/gdb/testsuite/gdb.threads/linux-dp.exp b/gdb/testsuite/gdb.threads/linux-dp.exp index fb2a2ed..abb4f87 100644 --- a/gdb/testsuite/gdb.threads/linux-dp.exp +++ b/gdb/testsuite/gdb.threads/linux-dp.exp @@ -70,7 +70,10 @@ for {set i 0} {$i < 5} {incr i} { -re "info threads\r\n" { exp_continue } - -re "^. +(\[0-9\]+ Thread \[-0-9a-fx\]+) \[^\n\]*\n" { + -re "^ *Id.*Frame *\[\r\n\]+" { + exp_continue + } + -re "^. +(\[0-9\]+ *Thread \[-0-9a-fx\]+) \[^\n\]*\n" { verbose -log "found thread $expect_out(1,string)" 2 lappend threads_before $expect_out(1,string) exp_continue @@ -136,7 +139,10 @@ for {set i 0} {$i < 5} {incr i} { -re "info threads\r\n" { exp_continue } - -re "^. +(\[0-9\]+ Thread \[-0-9a-fx\]+) \[^\n\]*\n" { + -re "^ *Id.*Frame *\[\r\n\]+" { + exp_continue + } + -re "^. +(\[0-9\]+ *Thread \[-0-9a-fx\]+) \[^\n\]*\n" { set name $expect_out(1,string) for {set j 0} {$j != [llength $threads_before] } {incr j} { if {$name == [lindex $threads_before $j]} { @@ -177,12 +183,12 @@ set nthreads 6 # Run until there are some threads. gdb_breakpoint [gdb_get_line_number "linuxthreads.exp: info threads 2"] gdb_continue_to_breakpoint "main thread's sleep" -set info_threads_ptn "" +set info_threads_ptn ".*" for {set i $nthreads} {$i > 0} {incr i -1} { - append info_threads_ptn "$i Thread .*" + append info_threads_ptn "$i *Thread .*" } append info_threads_ptn "\[\r\n\]+$gdb_prompt $" -set info_threads_manager_ptn "[expr $nthreads + 1] Thread .*$info_threads_ptn" +set info_threads_manager_ptn "[expr $nthreads + 1] *Thread .*$info_threads_ptn" gdb_test_multiple "info threads" "info threads 2" { -re "$info_threads_manager_ptn" { @@ -245,7 +251,7 @@ set only_five 1 for {set i 0} {$only_five > 0 && $i < 10} {incr i} { gdb_continue_to_breakpoint "thread 5's print, pass: $i" gdb_test_multiple "info threads" "" { - -re "\\* 5 Thread .* print_philosopher .*\r\n$gdb_prompt $" { + -re "\[*\] 5 *Thread .* +print_philosopher .*\r\n$gdb_prompt $" { # Okay this time. } -re ".*$gdb_prompt $" { diff --git a/gdb/testsuite/gdb.threads/manythreads.exp b/gdb/testsuite/gdb.threads/manythreads.exp index cfdd0e7..644f5f9 100644 --- a/gdb/testsuite/gdb.threads/manythreads.exp +++ b/gdb/testsuite/gdb.threads/manythreads.exp @@ -82,7 +82,7 @@ gdb_test_multiple "" "stop threads 1" { set cmd "info threads" set ok 0 gdb_test_multiple $cmd $cmd { - -re " 1 Thread " { + -re " 1 *Thread " { set ok 1 exp_continue } diff --git a/gdb/testsuite/gdb.threads/tls.exp b/gdb/testsuite/gdb.threads/tls.exp index eb76f1a..bf21104 100644 --- a/gdb/testsuite/gdb.threads/tls.exp +++ b/gdb/testsuite/gdb.threads/tls.exp @@ -214,7 +214,7 @@ gdb_test "continue" ".*Breakpoint 3.*still alive.*" "continue to synch point" set no_of_threads 0 send_gdb "info thread\n" gdb_expect { - -re "^info thread\[ \t\r\n\]+(\[0-9\]+) Thread.*$gdb_prompt $" { + -re "^info thread\[ \t\r\n\]+ *Id .*Frame\[ \t\r\n\]|(\[0-9\]+) *Thread.*$gdb_prompt $" { set no_of_threads $expect_out(1,string) pass "get number of threads" } @@ -262,10 +262,10 @@ gdb_test "continue" ".*Breakpoint 4.*before exit.*" "threads exited" send_gdb "info thread\n" gdb_expect { - -re ".* 1 Thread.*2 Thread.*$gdb_prompt $" { + -re ".* 1 *Thread.*2 *Thread.*$gdb_prompt $" { fail "Too many threads left at end" } - -re ".*\\\* 1 Thread.*main.*$gdb_prompt $" { + -re ".*\\\* 1 *Thread.*main.*$gdb_prompt $" { pass "Expect only base thread at end" } -re ".*No stack.*$gdb_prompt $" { |