-# 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.
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-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
-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}
+standard_testfile .S dw2-ref-missing-frame-func.c dw2-ref-missing-frame-main.c
+set objsfile [standard_output_file ${testfile}.o]
+set objfuncfile [standard_output_file ${testfile}-func.o]
+set objmainfile [standard_output_file ${testfile}-main.o]
-if { [gdb_compile "${srcdir}/${subdir}/${srcsfile}" $objsfile object {}] != ""
- || [gdb_compile "${srcdir}/${subdir}/${srcfuncfile}" $objfuncfile object {}] != ""
- || [gdb_compile "${srcdir}/${subdir}/${srcmainfile}" $objmainfile object {debug}] != ""
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $objsfile object {}] != ""
+ || [gdb_compile "${srcdir}/${subdir}/${srcfile2}" $objfuncfile object {}] != ""
+ || [gdb_compile "${srcdir}/${subdir}/${srcfile3}" $objmainfile object {debug}] != ""
|| [gdb_compile "$objsfile $objfuncfile $objmainfile" $binfile executable {}] != "" } {
return -1
}