GDB copyright headers update after running GDB's copyright.py script.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.dwarf2 / dw2-filename.exp
index f6cf8d1243c83e4e44f8170a51fc9784b2184bde..a55c065b82ed18ee6839310509b2fab151ab320f 100644 (file)
@@ -1,5 +1,4 @@
-# Copyright 2004, 2005, 2007, 2008, 2009, 2010, 2011
-# Free Software Foundation, Inc.
+# Copyright 2004-2016 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
 
 # Note: Inspired from dw2-basic.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-filename"
-set srcfile ${testfile}.S
-set binfile ${objdir}/${subdir}/${testfile}.x
+standard_testfile .S
+set dwarf_srcfile "file1.txt"
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {nodebug}] != "" } {
     return -1
 }
 
-clean_restart ${testfile}.x
+gdb_remote_download host ${srcdir}/${subdir}/${dwarf_srcfile}
+
+clean_restart ${testfile}
 
 # Verify that -file-list-exec-source-files returns a list where
 # the "file" is "file1.txt" (file base name), and "fullname" is
@@ -43,3 +38,6 @@ clean_restart ${testfile}.x
 # is that the file and fullname fields are now inverted.
 gdb_test "interpreter-exec mi -file-list-exec-source-files" \
          ".*{file=\"file1\\.txt\",fullname=\".+file1\\.txt\"}.*"
+
+# And `info sources' should return the fullname incl. the directories.
+gdb_test "info sources" {[/\\]file1\.txt}
This page took 0.024349 seconds and 4 git commands to generate.