Update copyright year range in header of all files managed by GDB
[binutils-gdb.git] / gdb / testsuite / gdb.base / annotate-symlink.exp
bloba0f8ed9eabc77be1deed28cf4afd9a79d24fb6b2
1 # Copyright (C) 2019-2023 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 realname-expand.c realname-expand-real.c
18 if [is_remote host] {
19     unsupported "compiling on a remote host does not support a filename with directory."
20     return 0
23 set srcdirabs [file join [pwd] $srcdir]
24 set srcfilelink [standard_output_file realname-expand-link.c]
26 remote_exec build "ln -sf ${srcdirabs}/${subdir}/${srcfile2} $srcfilelink"
28 if { [file type $srcfilelink] != "link" } {
29     unsupported "target directory cannot have symbolic links"
30     return -1
33 if { [gdb_compile "${srcdir}/${subdir}/${srcfile} ${srcfilelink}" "${binfile}" \
34                   executable {debug}] != "" } {
35     untested "failed to compile"
36     return -1
39 clean_restart ${testfile}
41 if {![runto_main]} {
42     return -1
45 gdb_breakpoint func message
47 gdb_test_no_output "set annotate 1"
49 # The patch to cause this output was reverted.
50 # See PR breakpoints/24915.
51 setup_xfail *-*-* 24915
52 gdb_test "continue" \
53     "Breakpoint .* func .*realname-expand-link.c:$decimal\r\n\032\032.*realname-expand-link.c:.*"