]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp
Update years in copyright notice for the GDB files.
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.dwarf2 / dw2-ref-missing-frame.exp
index d2874ba51aa4f4b72aa9fc71f95bc0298bd0d883..5c208c9c175b85dfcac401127716aa13c4468acf 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2008, 2009, 2010 Free Software Foundation, Inc.
+# Copyright 2008-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
 #
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
+load_lib dwarf.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-# For now pick a sampling of likely targets.
-if {![istarget *-*-linux*]
-    && ![istarget *-*-gnu*]
-    && ![istarget *-*-elf*]
-    && ![istarget *-*-openbsd*]
-    && ![istarget arm-*-eabi*]
-    && ![istarget powerpc-*-eabi*]} {
+if {![dwarf2_support]} {
     return 0  
 }
 
-set testfile "dw2-ref-missing-frame"
-set srcsfile ${testfile}.S
-set objsfile ${objdir}/${subdir}/${testfile}.o
+standard_testfile .S
 set srcfuncfile ${testfile}-func.c
-set objfuncfile ${objdir}/${subdir}/${testfile}-func.o
 set srcmainfile ${testfile}-main.c
-set objmainfile ${objdir}/${subdir}/${testfile}-main.o
 set executable ${testfile}
-set binfile ${objdir}/${subdir}/${executable}
 
-if { [gdb_compile "${srcdir}/${subdir}/${srcsfile}" $objsfile object {}] != ""
-     || [gdb_compile "${srcdir}/${subdir}/${srcfuncfile}" $objfuncfile object {}] != ""
-     || [gdb_compile "${srcdir}/${subdir}/${srcmainfile}" $objmainfile object {debug}] != ""
-     || [gdb_compile "$objsfile $objfuncfile $objmainfile" $binfile executable {}] != "" } {
+if {[prepare_for_testing_full $testfile.exp \
+        [list $testfile {} $srcfile {} $srcfuncfile {} \
+             $srcmainfile debug]]} {
     return -1
 }
 
-clean_restart $executable
-
 # First try referencing DW_AT_frame_base which is not defined.
 if [runto func_nofb] {
     gdb_test "p func_nofb_var" {Could not find the frame base for "func_nofb".} "func_nofb print"