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