]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.threads/tls-core.exp
Update copyright year range in all GDB files
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.threads / tls-core.exp
CommitLineData
e2882c85 1# Copyright 2017-2018 Free Software Foundation, Inc.
280ca31f
DT
2
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.
7#
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.
12#
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/>.
15
16standard_testfile
17
18if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
19 executable { debug }] != "" } {
20 return -1
21}
22
23
24clean_restart ${binfile}
25
26runto thread_proc
27
28#
29# Generate corefile.
30#
31set corefile [standard_output_file gcore.test]
32set core_supported [gdb_gcore_cmd "$corefile" "save a corefile"]
33if {!$core_supported} {
34 return 0
35}
36
37#
38# Restart gdb and load generated corefile.
39#
40clean_restart ${binfile}
41
42set core_loaded [gdb_core_cmd "$corefile" "load generated corefile"]
43if { $core_loaded != 1 } {
44 # No use proceeding from here.
45 return 0
46}
47
48# This fails in cross-debugging due to the use of native `libthread_db'.
49if {![string match $host_triplet $target_triplet]} {
50 setup_kfail "threads/22381" "*-*-*"
51}
52gdb_test "p/x foo" \
53 "\\$\[0-9]+ = 0xdeadbeef" \
54 "print thread-local storage variable"
55
56gdb_exit