]> 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
1d506c26 1# Copyright 2013-2024 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 18# Fission doesn't support macros yet. Bug 15954.
a231b232 19require !using_fission
01672a57 20
52c0551e
TT
21# Compiling on a remote host does not support a filename with
22# directory.
23require {!is_remote host}
3bdff46b 24
9be5d742 25set opts {debug additional_flags=-I. macros}
233d95b5
JK
26
27if { [file pathtype $objdir] == "relative" } {
28 untested "objdir $objdir should be absolute"
29 return
30}
019a5c62
SM
31
32with_cwd $srcdir/${subdir}/base/two {
33 if { [gdb_compile "../../${srcfile}" "${binfile}" executable $opts] != "" } {
34 untested "compilation failed"
35 return
36 }
233d95b5
JK
37}
38
39clean_restart ${testfile}
40
41# Test macros respect DW_AT_comp_dir.
42
43# "list header_two_func" does not set exactly the one line we want.
44if ![runto header_two_func] {
45 return -1
46}
47
48gdb_test "info macro HEADER" "\r\n#define HEADER 2"