]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.linespec/macro-relative.exp
Update copyright year range in header of all files managed by GDB
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.linespec / macro-relative.exp
CommitLineData
213516ef 1# Copyright 2013-2023 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
01672a57
DE
18# Fission doesn't support macros yet. Bug 15954.
19if [using_fission] {
20 unsupported "fission"
21 return -1
22}
23
3bdff46b 24if [is_remote host] {
bc6c7af4 25 unsupported "compiling on a remote host does not support a filename with directory."
3bdff46b
LM
26 return 0
27}
28
9be5d742 29set opts {debug additional_flags=-I. macros}
233d95b5
JK
30
31if { [file pathtype $objdir] == "relative" } {
32 untested "objdir $objdir should be absolute"
33 return
34}
019a5c62
SM
35
36with_cwd $srcdir/${subdir}/base/two {
37 if { [gdb_compile "../../${srcfile}" "${binfile}" executable $opts] != "" } {
38 untested "compilation failed"
39 return
40 }
233d95b5
JK
41}
42
43clean_restart ${testfile}
44
45# Test macros respect DW_AT_comp_dir.
46
47# "list header_two_func" does not set exactly the one line we want.
48if ![runto header_two_func] {
49 return -1
50}
51
52gdb_test "info macro HEADER" "\r\n#define HEADER 2"