aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.cp/psmang.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.cp/psmang.exp')
-rw-r--r--gdb/testsuite/gdb.cp/psmang.exp30
1 files changed, 5 insertions, 25 deletions
diff --git a/gdb/testsuite/gdb.cp/psmang.exp b/gdb/testsuite/gdb.cp/psmang.exp
index 1dc5368..fc895e6 100644
--- a/gdb/testsuite/gdb.cp/psmang.exp
+++ b/gdb/testsuite/gdb.cp/psmang.exp
@@ -178,42 +178,22 @@
if { [skip_cplus_tests] } { continue }
-set testfile "psmang"
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile psmang1.cc psmang2.cc
if [get_compiler_info "c++"] {
return -1;
}
-if { [gdb_compile "${srcdir}/${subdir}/${testfile}1.cc" "${testfile}1.o" object {debug c++}] != "" } {
- untested psmang.exp
- return -1
+if {[prepare_for_testing $testfile.exp $testfile \
+ [list $srcfile $srcfile2] {debug c++}]} {
+ return -1
}
-if { [gdb_compile "${srcdir}/${subdir}/${testfile}2.cc" "${testfile}2.o" object {debug c++}] != "" } {
- untested psmang.exp
- return -1
-}
-
-if { [gdb_compile "${testfile}1.o ${testfile}2.o" ${binfile} executable {debug c++}] != "" } {
- untested psmang.exp
- return -1
-}
-
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
gdb_test "break s::method1" "Breakpoint .* at .*: file .*psmang1.cc.*"
# We have to exit and restart GDB here, to make sure that all the
# compilation units are psymtabs again.
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+clean_restart ${binfile}
gdb_test "break s::method2" "Breakpoint .* at .*: file .*psmang2.cc.*"