]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.base/annotate-symlink.exp
Update copyright year range in header of all files managed by GDB
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.base / annotate-symlink.exp
CommitLineData
1d506c26 1# Copyright (C) 2019-2024 Free Software Foundation, Inc.
a0c1ffed
TT
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 realname-expand.c realname-expand-real.c
17
52c0551e
TT
18# Compiling on a remote host does not support a filename with
19# directory.
20require {!is_remote host}
a0c1ffed
TT
21
22set srcdirabs [file join [pwd] $srcdir]
23set srcfilelink [standard_output_file realname-expand-link.c]
24
25remote_exec build "ln -sf ${srcdirabs}/${subdir}/${srcfile2} $srcfilelink"
26
27if { [file type $srcfilelink] != "link" } {
28 unsupported "target directory cannot have symbolic links"
29 return -1
30}
31
32if { [gdb_compile "${srcdir}/${subdir}/${srcfile} ${srcfilelink}" "${binfile}" \
33 executable {debug}] != "" } {
34 untested "failed to compile"
35 return -1
36}
37
38clean_restart ${testfile}
39
40if {![runto_main]} {
a0c1ffed
TT
41 return -1
42}
43
44gdb_breakpoint func message
45
46gdb_test_no_output "set annotate 1"
47
5abbbe1d
TT
48# The patch to cause this output was reverted.
49# See PR breakpoints/24915.
50setup_xfail *-*-* 24915
a0c1ffed
TT
51gdb_test "continue" \
52 "Breakpoint .* func .*realname-expand-link.c:$decimal\r\n\032\032.*realname-expand-link.c:.*"