Update copyright year range in all GDB files
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.dwarf2 / dw2-bad-parameter-type.exp
index 2f44d14a32db09a956e53386754c6aac00e9fe2e..cb09c02684499f20edeb83476662262c72529d38 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2010, 2011 Free Software Foundation, Inc.
+# Copyright 2010-2021 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-bad-parameter-type"
-set srcfile ${testfile}.S
-set executable ${testfile}.x
-set binfile ${objdir}/${subdir}/${executable}
+standard_testfile .S
+set executable ${testfile}
 
 # First try referencing DW_AT_frame_base which is not defined.
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
@@ -38,7 +31,10 @@ clean_restart $executable
 
 # The first access (as we do not use -readnow) prints some:
 # Dwarf Error: Cannot find DIE at 0x0 referenced from DIE at 0x29 [in module ...]
-gdb_test "ptype f"
-
-gdb_test "ptype f"
+with_test_prefix "first" {
+    gdb_test "ptype f"
+}
+with_test_prefix "second" {
+    gdb_test "ptype f"
+}
 gdb_test "p 5" " = 5" "is alive"
This page took 0.031169 seconds and 4 git commands to generate.