| OLD | NEW |
| 1 # Copyright 2011-2012 Free Software Foundation, Inc. | 1 # Copyright 2011-2012 Free Software Foundation, Inc. |
| 2 # | 2 # |
| 3 # This program is free software; you can redistribute it and/or modify | 3 # This program is free software; you can redistribute it and/or modify |
| 4 # it under the terms of the GNU General Public License as published by | 4 # it under the terms of the GNU General Public License as published by |
| 5 # the Free Software Foundation; either version 3 of the License, or | 5 # the Free Software Foundation; either version 3 of the License, or |
| 6 # (at your option) any later version. | 6 # (at your option) any later version. |
| 7 # | 7 # |
| 8 # This program is distributed in the hope that it will be useful, | 8 # This program is distributed in the hope that it will be useful, |
| 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 # GNU General Public License for more details. | 11 # GNU General Public License for more details. |
| 12 # | 12 # |
| 13 # You should have received a copy of the GNU General Public License | 13 # You should have received a copy of the GNU General Public License |
| 14 # along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | 15 |
| 16 # Are we on a target board? And non-Linux targets seem to identify the thread | 16 # Are we on a target board? And non-Linux targets seem to identify the thread |
| 17 # differently. | 17 # differently. |
| 18 if {![isnative] || ![istarget "*-*-linux*"]} { | 18 if {![isnative] || ![istarget "*-*-linux*"]} { |
| 19 return | 19 return |
| 20 } | 20 } |
| 21 | 21 |
| 22 set testfile "corethreads" | 22 standard_testfile |
| 23 set srcfile ${testfile}.c | |
| 24 set executable ${testfile} | 23 set executable ${testfile} |
| 25 set binfile ${objdir}/${subdir}/${executable} | |
| 26 if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executa
ble {debug}] != "" } { | 24 if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executa
ble {debug}] != "" } { |
| 27 untested ${testfile}.exp | 25 untested ${testfile}.exp |
| 28 return -1 | 26 return -1 |
| 29 } | 27 } |
| 30 | 28 |
| 31 set corefile [core_find $binfile] | 29 set corefile [core_find $binfile] |
| 32 if {$corefile == ""} { | 30 if {$corefile == ""} { |
| 33 return 0 | 31 return 0 |
| 34 } | 32 } |
| 35 | 33 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 49 gdb_test_multiple "p/x thread1" $test { | 47 gdb_test_multiple "p/x thread1" $test { |
| 50 -re " = (0x\[0-9a-f\]+)\r\n$gdb_prompt $" { | 48 -re " = (0x\[0-9a-f\]+)\r\n$gdb_prompt $" { |
| 51 pass $test | 49 pass $test |
| 52 set thread1 $expect_out(1,string) | 50 set thread1 $expect_out(1,string) |
| 53 } | 51 } |
| 54 } | 52 } |
| 55 | 53 |
| 56 gdb_test "info threads" "\r\n *\[12\] +Thread $thread0 .*" "thread0 found" | 54 gdb_test "info threads" "\r\n *\[12\] +Thread $thread0 .*" "thread0 found" |
| 57 gdb_test "info threads" "\r\n *\\*? +\[12\] +Thread $thread1 .*" "thread1 found" | 55 gdb_test "info threads" "\r\n *\\*? +\[12\] +Thread $thread1 .*" "thread1 found" |
| 58 gdb_test "info threads" "\r\n\[ \t\]*Id\[ \t\]+Target\[ \t\]+Id\[ \t\]+Frame\[ \
t\]*\r\n\[^\r\n\]+\r\n\[^\r\n\]+" "no other thread found" | 56 gdb_test "info threads" "\r\n\[ \t\]*Id\[ \t\]+Target\[ \t\]+Id\[ \t\]+Frame\[ \
t\]*\r\n\[^\r\n\]+\r\n\[^\r\n\]+" "no other thread found" |
| OLD | NEW |