2013-04-24 Muhammad Bilal <mbilal@codesourcery.com>
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / realname-expand.exp
CommitLineData
fbd9ab74
JK
1# Copyright (C) 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 .c realname-expand-real.c
17
18set srcdirabs [file join [pwd] $srcdir]
19set srcfilelink [standard_output_file realname-expand-link.c]
20
21remote_exec build "ln -sf ${srcdirabs}/${subdir}/${srcfile2} $srcfilelink"
22
23if { [file type $srcfilelink] != "link" } {
24 unsupported "target directory cannot have symbolic links"
25 return -1
26}
27
28if { [gdb_compile "${srcdir}/${subdir}/${srcfile} ${srcfilelink}" "${binfile}" \
29 executable {debug}] != "" } {
30 untested "cannot compile ${srcdir}/${subdir}/${srcfile} and ${srcfilelink}"
31 return -1
32}
33
34clean_restart ${testfile}
35
36gdb_test_no_output "set basenames-may-differ on"
37
38gdb_test "rbreak realname-expand-real.c:func" "^rbreak realname-expand-real.c:func\r\nBreakpoint 1 at 0x\[0-9a-f\]+: file \[^\r\n\]*/realname-expand-link\\.c, line \[0-9\]+\\.\r\nvoid func\\(void\\);"
39
40clean_restart ${testfile}
41
42gdb_test_no_output "set basenames-may-differ on"
43
44gdb_test "break realname-expand-real.c:func" "^break realname-expand-real.c:func\r\nBreakpoint 1 at 0x\[0-9a-f\]+: file \[^\r\n\]*/realname-expand-link\\.c, line \[0-9\]+\\."
This page took 0.056545 seconds and 4 git commands to generate.