]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.base/realname-expand.exp
Update copyright year range in header of all files managed by GDB
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.base / realname-expand.exp
CommitLineData
213516ef 1# Copyright (C) 2013-2023 Free Software Foundation, Inc.
fbd9ab74
JK
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 .c realname-expand-real.c
17
3bdff46b 18if [is_remote host] {
bc6c7af4 19 unsupported "compiling on a remote host does not support a filename with directory."
3bdff46b
LM
20 return 0
21}
22
fbd9ab74
JK
23set srcdirabs [file join [pwd] $srcdir]
24set srcfilelink [standard_output_file realname-expand-link.c]
25
26remote_exec build "ln -sf ${srcdirabs}/${subdir}/${srcfile2} $srcfilelink"
27
28if { [file type $srcfilelink] != "link" } {
29 unsupported "target directory cannot have symbolic links"
30 return -1
31}
32
33if { [gdb_compile "${srcdir}/${subdir}/${srcfile} ${srcfilelink}" "${binfile}" \
34 executable {debug}] != "" } {
84c93cd5 35 untested "failed to compile"
fbd9ab74
JK
36 return -1
37}
38
39clean_restart ${testfile}
40
41gdb_test_no_output "set basenames-may-differ on"
42
f05f3e72
LS
43gdb_test "rbreak realname-expand-real.c:func" \
44 [multi_line "" \
45 "Breakpoint 1 at $hex: file \[^\r\n\]*/realname-expand-link\\.c, line $decimal\\." \
46 "void func\\(void\\);"]
fbd9ab74 47
f05f3e72 48delete_breakpoints
fbd9ab74 49
f05f3e72
LS
50gdb_test "break realname-expand-real.c:func" \
51 "\r\nBreakpoint 2 at $hex: file \[^\r\n\]*/realname-expand-link\\.c, line $decimal\\."