ignore invalid DOF provider sections
[binutils-gdb.git] / gdb / testsuite / gdb.threads / info-threads-cur-sal.exp
blob3cad0a2e70f3c3cc299c3f3c48b2e2efa522c3b1
1 # Copyright (C) 2013-2015 Free Software Foundation, Inc.
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
5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 # GNU General Public License for more details.
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/>.
16 standard_testfile info-threads-cur-sal.c info-threads-cur-sal-2.c
18 set executable ${testfile}
20 if {[gdb_compile_pthreads \
21          "${srcdir}/${subdir}/${srcfile} ${srcdir}/${subdir}/${srcfile2}" \
22          "${binfile}" executable {debug}] != "" } {
23     return -1
26 clean_restart ${executable}
28 if ![runto_main] {
29     return -1
32 gdb_breakpoint "start"
33 gdb_continue_to_breakpoint "start"
35 set line [gdb_get_line_number "should show this line" "${srcfile2}"]
37 gdb_test "list $line" \
38     "\"list\" should show this line.*" \
39     "list before info threads"
41 # There used to be a bug where "info threads" would set the current
42 # SAL to the location of the last thread displayed.
43 gdb_test "info threads" \
44     "\r\n\[ \t\]*Id\[ \t\]+Target\[ \t\]+Id\[ \t\]+Frame\[ \t\]*\r\n\\* 2 *Thread \[^\r\n\]* at \[^\r\n\]*\r\n  1 *Thread \[^\r\n\]* .* \[^\r\n\]*" \
45     "info threads before break"
47 # Check that "break" is still operating on the same file by default.
48 gdb_test "break $line" ".*${srcfile2}.*" "break on line"
50 gdb_test "info threads" \
51     "\r\n\[ \t\]*Id\[ \t\]+Target\[ \t\]+Id\[ \t\]+Frame\[ \t\]*\r\n\\* 2 *Thread \[^\r\n\]* at \[^\r\n\]*\r\n  1 *Thread \[^\r\n\]* .* \[^\r\n\]*" \
52     "info threads before list"
54 # And that so is "list".
55 gdb_test "list $line" \
56     "\"list\" should show this line.*" \
57     "list after info threads"