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 # Please email any bugs, comments, and/or additions to this file to: | 16 # Please email any bugs, comments, and/or additions to this file to: |
17 # bug-gdb@gnu.org | 17 # bug-gdb@gnu.org |
18 | 18 |
19 if $tracelevel then { | 19 standard_testfile linux-dp.c |
20 » strace $tracelevel | |
21 } | |
22 | |
23 set testfile "linux-dp" | |
24 set srcfile ${testfile}.c | |
25 set binfile ${objdir}/${subdir}/${testfile} | |
26 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
le {debug}] != ""} { | 20 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
le {debug}] != ""} { |
27 return -1 | 21 return -1 |
28 } | 22 } |
29 | 23 |
30 gdb_start | 24 clean_restart ${binfile} |
31 gdb_reinitialize_dir $srcdir/$subdir | |
32 gdb_load ${binfile} | |
33 gdb_test_no_output "set print sevenbit-strings" | 25 gdb_test_no_output "set print sevenbit-strings" |
34 runto_main | 26 runto_main |
35 | 27 |
36 # Run until there are some threads. | 28 # Run until there are some threads. |
37 gdb_breakpoint [gdb_get_line_number "linuxthreads.exp: info threads 2"] | 29 gdb_breakpoint [gdb_get_line_number "linuxthreads.exp: info threads 2"] |
38 gdb_continue_to_breakpoint "main thread's sleep" | 30 gdb_continue_to_breakpoint "main thread's sleep" |
39 | 31 |
40 # Make sure thread list is up-to-date (in case remote targets have not yet | 32 # Make sure thread list is up-to-date (in case remote targets have not yet |
41 # reported thread creation events) | 33 # reported thread creation events) |
42 gdb_test "info threads" | 34 gdb_test "info threads" |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 | 425 |
434 # Test bad input | 426 # Test bad input |
435 | 427 |
436 gdb_test "info thread foo" \ | 428 gdb_test "info thread foo" \ |
437 "Args must be numbers or '.' variables." \ | 429 "Args must be numbers or '.' variables." \ |
438 "info thread foo" | 430 "info thread foo" |
439 | 431 |
440 gdb_test "info thread foo -1" \ | 432 gdb_test "info thread foo -1" \ |
441 "Args must be numbers or '.' variables." \ | 433 "Args must be numbers or '.' variables." \ |
442 "info thread foo -1" | 434 "info thread foo -1" |
OLD | NEW |