OLD | NEW |
1 # temargs.exp - Template argument tests | 1 # temargs.exp - Template argument tests |
2 # | 2 # |
3 # Copyright 2010-2012 Free Software Foundation, Inc. | 3 # Copyright 2010-2012 Free Software Foundation, Inc. |
4 # | 4 # |
5 # This program is free software; you can redistribute it and/or modify | 5 # This program is free software; you can redistribute it and/or modify |
6 # it under the terms of the GNU General Public License as published by | 6 # it under the terms of the GNU General Public License as published by |
7 # the Free Software Foundation; either version 3 of the License, or | 7 # the Free Software Foundation; either version 3 of the License, or |
8 # (at your option) any later version. | 8 # (at your option) any later version. |
9 # | 9 # |
10 # This program is distributed in the hope that it will be useful, | 10 # This program is distributed in the hope that it will be useful, |
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 # GNU General Public License for more details. | 13 # GNU General Public License for more details. |
14 # | 14 # |
15 # You should have received a copy of the GNU General Public License | 15 # You should have received a copy of the GNU General Public License |
16 # along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | 17 |
18 # This file is part of the gdb testsuite. | 18 # This file is part of the gdb testsuite. |
19 | 19 |
20 if {$tracelevel} { | |
21 strace $tracelevel | |
22 } | |
23 | |
24 if {[skip_cplus_tests]} { | 20 if {[skip_cplus_tests]} { |
25 continue | 21 continue |
26 } | 22 } |
27 | 23 |
28 set testfile "temargs" | 24 standard_testfile .cc |
29 set srcfile "${testfile}.cc" | |
30 | 25 |
31 if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} { | 26 if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} { |
32 return -1 | 27 return -1 |
33 } | 28 } |
34 | 29 |
35 if {![runto_main]} { | 30 if {![runto_main]} { |
36 return -1 | 31 return -1 |
37 } | 32 } |
38 | 33 |
39 # NOTE: prepare_for_testing calls get_compiler_info, which we need | 34 # NOTE: prepare_for_testing calls get_compiler_info, which we need |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 # | 164 # |
170 # Tests in K2::k2_m. | 165 # Tests in K2::k2_m. |
171 # | 166 # |
172 | 167 |
173 gdb_continue_to_breakpoint "continue to fifth breakpoint for temargs" | 168 gdb_continue_to_breakpoint "continue to fifth breakpoint for temargs" |
174 | 169 |
175 if $have_older_template_gcc { setup_xfail "*-*-*" } | 170 if $have_older_template_gcc { setup_xfail "*-*-*" } |
176 gdb_test "ptype F" "type = void \\\(S::\\\*\\\)\\\(S \\\* const\\\)" \ | 171 gdb_test "ptype F" "type = void \\\(S::\\\*\\\)\\\(S \\\* const\\\)" \ |
177 "test type of F in k2_m" | 172 "test type of F in k2_m" |
178 | 173 |
179 setup_kfail gcc/49366 "*-*-*" | 174 setup_xfail gcc/49366 "*-*-*" |
180 gdb_test "print F" "&S::somefunc" "test value of F in k2_m" | 175 gdb_test "print F" "&S::somefunc" "test value of F in k2_m" |
181 | 176 |
182 # | 177 # |
183 # Tests in K3::k3_m, GCC PR debug/49546. | 178 # Tests in K3::k3_m, GCC PR debug/49546. |
184 # The problem reproduces with DW_AT_MIPS_linkage_name. It does not happen with | 179 # The problem reproduces with DW_AT_MIPS_linkage_name. It does not happen with |
185 # GDB physname - GDB's own computation of the linkage name based on | 180 # GDB physname - GDB's own computation of the linkage name based on |
186 # (incorrectly output by GCC) DW_AT_name. | 181 # (incorrectly output by GCC) DW_AT_name. |
187 # | 182 # |
188 | 183 |
189 gdb_continue_to_breakpoint "continue to sixth breakpoint for temargs" | 184 gdb_continue_to_breakpoint "continue to sixth breakpoint for temargs" |
190 | 185 |
191 if $have_older_template_gcc { setup_xfail "*-*-*" | 186 if $have_older_template_gcc { setup_xfail "*-*-*" |
192 } else { setup_kfail gcc/49546 "*-*-*" } | 187 } else { setup_xfail gcc/49546 "*-*-*" } |
193 gdb_test "ptype F" {type = void \(\*\)\(int\)} "test type of F in k3_m" | 188 gdb_test "ptype F" {type = void \(\*\)\(int\)} "test type of F in k3_m" |
194 | 189 |
195 if $have_older_template_gcc { setup_xfail "*-*-*" | 190 if $have_older_template_gcc { setup_xfail "*-*-*" |
196 } else { setup_kfail gcc/49546 "*-*-*" } | 191 } else { setup_xfail gcc/49546 "*-*-*" } |
197 gdb_test "print F" { = \(void \(\*\)\(int\)\) 0x[0-9a-f]+ <S3::m\(int\)>} \ | 192 gdb_test "print F" { = \(void \(\*\)\(int\)\) 0x[0-9a-f]+ <S3::m\(int\)>} \ |
198 "test value of F in k3_m" | 193 "test value of F in k3_m" |
OLD | NEW |