Index: gdb/testsuite/gdb.base/return-nodebug.exp |
diff --git a/gdb/testsuite/gdb.base/return-nodebug.exp b/gdb/testsuite/gdb.base/return-nodebug.exp |
index 1802862c3b46a117256190a4a2fc4477b5324300..66c0a29cd0c36d8b97c6be1ac560d0ca77cbd75d 100644 |
--- a/gdb/testsuite/gdb.base/return-nodebug.exp |
+++ b/gdb/testsuite/gdb.base/return-nodebug.exp |
@@ -1,4 +1,4 @@ |
-# Copyright (C) 2009-2012 Free Software Foundation, Inc. |
+# Copyright (C) 2009-2013 Free Software Foundation, Inc. |
# This program is free software; you can redistribute it and/or modify |
# it under the terms of the GNU General Public License as published by |
@@ -45,30 +45,16 @@ foreach type {{signed char} {short} {int} {long} {long long} {float} {double}} { |
set typeesc [string map {{ } {\ }} $type] |
set typenospace [string map {{ } -} $type] |
- set testfile "return-nodebug" |
- set srcfile ${testfile}.c |
- set srcfile1 ${testfile}1.c |
- set binfile ${objdir}/${subdir}/${testfile}-${typenospace} |
+ standard_testfile .c return-nodebug1.c |
set additional_flags "additional_flags=-DTYPE=$typeesc" |
- if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object [list debug $additional_flags]] != "" } { |
+ if {[prepare_for_testing_full $testfile.exp \ |
+ [list ${testfile}-${typenospace} debug \ |
+ $srcfile [list debug $additional_flags] \ |
+ $srcfile2 [list $additional_flags]]]} { |
continue |
} |
- # This one is compiled without debug info. |
- if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}1.o" object [list $additional_flags]] != "" } { |
- continue |
- } |
- |
- if { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug}] != "" } { |
- continue |
- } |
- |
- gdb_exit |
- gdb_start |
- gdb_reinitialize_dir $srcdir/$subdir |
- gdb_load ${binfile} |
- |
do_test $type |
} |