testsuite/gdb.dwarf2: dw2-case-insensitive.exp: p fuNC_lang fails on arm
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.dwarf2 / dwp-symlink.exp
CommitLineData
82bf32bc
JK
1# Copyright 2013 Free Software Foundation, Inc.
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 [is_remote host] {
19 untested "remote host"
20 return 0
21}
22
23file delete [standard_output_file ${testfile}.dwp]
24if [file exists [standard_output_file ${testfile}.dwp]] {
25 unsupported "dwp file cannot be deleted"
26 return 0
27}
28if { [build_executable ${testfile}.exp ${testfile} ${srcfile}] == -1 } {
29 return -1
30}
31if ![file exists [standard_output_file ${testfile}.dwp]] {
32 unsupported "testsuite run does not produce dwp files"
33 return 0
34}
35
36set thelink "${testfile}-thelink"
37
38file delete [standard_output_file ${thelink}]
39file delete [standard_output_file ${thelink}.dwp]
40# file link is only Tcl 8.4+.
41exec "ln" "-sf" "${testfile}" "[standard_output_file $thelink]"
42if ![file exists [standard_output_file $thelink]] {
43 unsupported "host does not support symbolic links (binary symlink is missing)"
44 return 0
45}
46if [file exists [standard_output_file $thelink.dwp]] {
47 unsupported "host does not support symbolic links (we tried to delete a file and it is still there)"
48 return 0
49}
50
51clean_restart "$testfile"
52
53gdb_test "ptype main" {type = int \(int, char \*\*\)} "binary default, dwp default"
54
55clean_restart "$thelink"
56
57gdb_test "ptype main" {type = int \(int, char \*\*\)} "binary symlink, dwp default"
58
59gdb_exit
60file rename [standard_output_file ${testfile}.dwp] [standard_output_file ${thelink}.dwp]
61if [file exists [standard_output_file ${testfile}.dwp]] {
62 unsupported "host does not support symbolic links (binary symlink exists)"
63 return 0
64}
65if ![file exists [standard_output_file ${thelink}.dwp]] {
66 unsupported "host does not support symbolic links (dwp symlink is missing)"
67 return 0
68}
69
70clean_restart "$testfile"
71
72# This case cannot work.
73gdb_test "ptype main" {type = int \(\)} "binary default, dwp at symlink"
74
75clean_restart "$thelink"
76
77gdb_test "ptype main" {type = int \(int, char \*\*\)} "binary symlink, dwp at symlink"
This page took 0.039855 seconds and 4 git commands to generate.