daily update
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.linespec / macro-relative.exp
CommitLineData
ecd75fc8 1# Copyright 2013-2014 Free Software Foundation, Inc.
233d95b5
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
17
18set opts {debug additional_flags=-I.}
19
20get_compiler_info
21if [test_compiler_info gcc*] {
22 lappend opts additional_flags=-g3
23}
24
25if { [file pathtype $objdir] == "relative" } {
26 untested "objdir $objdir should be absolute"
27 return
28}
29set saved_pwd [pwd]
30cd $srcdir/${subdir}/base/two
31set err [gdb_compile "../../${srcfile}" "${binfile}" executable $opts]
32cd $saved_pwd
33if { $err != "" } {
34 untested "compilation failed"
35 return -1
36}
37
38clean_restart ${testfile}
39
40# Test macros respect DW_AT_comp_dir.
41
42# "list header_two_func" does not set exactly the one line we want.
43if ![runto header_two_func] {
44 return -1
45}
46
47gdb_test "info macro HEADER" "\r\n#define HEADER 2"
This page took 0.279307 seconds and 4 git commands to generate.