summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/psymtab.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.base/psymtab.exp')
-rw-r--r--gdb/testsuite/gdb.base/psymtab.exp27
1 files changed, 6 insertions, 21 deletions
diff --git a/gdb/testsuite/gdb.base/psymtab.exp b/gdb/testsuite/gdb.base/psymtab.exp
index 9c96536ff3f..854455e0293 100644
--- a/gdb/testsuite/gdb.base/psymtab.exp
+++ b/gdb/testsuite/gdb.base/psymtab.exp
@@ -26,23 +26,7 @@
if { [skip_cplus_tests] } { continue }
-set testfile "psymtab"
-set binfile ${objdir}/${subdir}/${testfile}
-
-if { [gdb_compile "${srcdir}/${subdir}/${testfile}1.c" "${testfile}1.o" object {debug}] != "" } {
- untested psymtab.exp
- return -1
-}
-
-if { [gdb_compile "${srcdir}/${subdir}/${testfile}2.c" "${testfile}2.o" object {debug}] != "" } {
- untested psymtab.exp
- return -1
-}
-
-if { [gdb_compile "${testfile}1.o ${testfile}2.o" ${binfile} executable {debug}] != "" } {
- untested psymtab.exp
- return -1
-}
+standard_testfile psymtab1.c psymtab2.c
# Create and source the file that provides information about the compiler
# used to compile the test case.
@@ -50,10 +34,11 @@ if [get_compiler_info] {
return -1
}
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+if {[prepare_for_testing $testfile.exp $testfile \
+ [list $srcfile $srcfile2] debug]} {
+ untested $testfile.exp
+ return -1
+}
# Disable the prompt for whether to set pending breakpoints.
# We don't want a breakpoint, we just want to verify the symbol