Index: gdb/testsuite/gdb.opt/clobbered-registers-O2.exp |
diff --git a/gdb/testsuite/gdb.opt/clobbered-registers-O2.exp b/gdb/testsuite/gdb.opt/clobbered-registers-O2.exp |
index b90c16469d57aa4ef175cd4bb22320c2aaf45b75..a733baa0d187bd5d2227be0f57c13f53e4f0b201 100644 |
--- a/gdb/testsuite/gdb.opt/clobbered-registers-O2.exp |
+++ b/gdb/testsuite/gdb.opt/clobbered-registers-O2.exp |
@@ -15,36 +15,22 @@ |
# |
# This file is part of the gdb testsuite. |
-if $tracelevel then { |
- strace $tracelevel |
-} |
- |
# Test displaying call clobbered registers in optimized binaries. |
# GDB should not show incorrect values. |
-set testfile clobbered-registers-O2 |
-set srcfile ${testfile}.c |
-set binfile ${objdir}/${subdir}/${testfile} |
+standard_testfile |
# What compiler are we using? |
# |
-if [get_compiler_info ${binfile}] { |
+if [get_compiler_info] { |
return -1 |
} |
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [concat debug optimize=-O2 nowarnings]] != "" } { |
- untested clobbered-registers-O2.exp |
- return -1 |
+if {[prepare_for_testing $testfile.exp $testfile $srcfile \ |
+ {debug optimize=-O2 nowarnings}]} { |
+ return -1 |
} |
-# use this to debug: |
-#log_user 1 |
- |
-gdb_exit |
-gdb_start |
-gdb_reinitialize_dir $srcdir/$subdir |
-gdb_load ${binfile} |
- |
if { ![runto start_sequence] } then { |
fail "run to start_sequence" |
return |