OLD | NEW |
1 # Copyright 2002, 2004, 2007-2012 Free Software Foundation, Inc. | 1 # Copyright 2002, 2004, 2007-2012 Free Software Foundation, Inc. |
2 | 2 |
3 # This program is free software; you can redistribute it and/or modify | 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 | 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 | 5 # the Free Software Foundation; either version 3 of the License, or |
6 # (at your option) any later version. | 6 # (at your option) any later version. |
7 # | 7 # |
8 # This program is distributed in the hope that it will be useful, | 8 # This program is distributed in the hope that it will be useful, |
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 # started with lower-case letters, so the demangled name `S::method1' | 164 # started with lower-case letters, so the demangled name `S::method1' |
165 # sorted at the same place as the mangled name `_ZN1S7method1Ev': at | 165 # sorted at the same place as the mangled name `_ZN1S7method1Ev': at |
166 # the very beginning. Using a lower-case 's' as the name ensures that | 166 # the very beginning. Using a lower-case 's' as the name ensures that |
167 # the demangled name falls after all the dummy symbols introduced for | 167 # the demangled name falls after all the dummy symbols introduced for |
168 # the hash table, as described above. | 168 # the hash table, as described above. |
169 # | 169 # |
170 # This is all so tortured, someone will probably come up with still | 170 # This is all so tortured, someone will probably come up with still |
171 # other ways this test could fail to do its job. If you need to make | 171 # other ways this test could fail to do its job. If you need to make |
172 # revisions, please be very careful. | 172 # revisions, please be very careful. |
173 | 173 |
174 if $tracelevel then { | |
175 strace $tracelevel | |
176 } | |
177 | |
178 # | 174 # |
179 # test running programs | 175 # test running programs |
180 # | 176 # |
181 | 177 |
182 | 178 |
183 if { [skip_cplus_tests] } { continue } | 179 if { [skip_cplus_tests] } { continue } |
184 | 180 |
185 set testfile "psmang" | 181 standard_testfile psmang1.cc psmang2.cc |
186 set binfile ${objdir}/${subdir}/${testfile} | |
187 | 182 |
188 if [get_compiler_info ${binfile} "c++"] { | 183 if [get_compiler_info "c++"] { |
189 return -1; | 184 return -1; |
190 } | 185 } |
191 | 186 |
192 if { [gdb_compile "${srcdir}/${subdir}/${testfile}1.cc" "${testfile}1.o" object
{debug c++}] != "" } { | 187 if {[prepare_for_testing $testfile.exp $testfile \ |
193 untested psmang.exp | 188 » [list $srcfile $srcfile2] {debug c++}]} { |
194 return -1 | 189 return -1 |
195 } | 190 } |
196 | 191 |
197 if { [gdb_compile "${srcdir}/${subdir}/${testfile}2.cc" "${testfile}2.o" object
{debug c++}] != "" } { | |
198 untested psmang.exp | |
199 return -1 | |
200 } | |
201 | |
202 if { [gdb_compile "${testfile}1.o ${testfile}2.o" ${binfile} executable {debug
c++}] != "" } { | |
203 untested psmang.exp | |
204 return -1 | |
205 } | |
206 | |
207 | |
208 gdb_exit | |
209 gdb_start | |
210 gdb_reinitialize_dir $srcdir/$subdir | |
211 gdb_load ${binfile} | |
212 | |
213 gdb_test "break s::method1" "Breakpoint .* at .*: file .*psmang1.cc.*" | 192 gdb_test "break s::method1" "Breakpoint .* at .*: file .*psmang1.cc.*" |
214 | 193 |
215 # We have to exit and restart GDB here, to make sure that all the | 194 # We have to exit and restart GDB here, to make sure that all the |
216 # compilation units are psymtabs again. | 195 # compilation units are psymtabs again. |
217 | 196 |
218 gdb_exit | 197 clean_restart ${binfile} |
219 gdb_start | |
220 gdb_reinitialize_dir $srcdir/$subdir | |
221 gdb_load ${binfile} | |
222 | 198 |
223 gdb_test "break s::method2" "Breakpoint .* at .*: file .*psmang2.cc.*" | 199 gdb_test "break s::method2" "Breakpoint .* at .*: file .*psmang2.cc.*" |
OLD | NEW |