c++/24367: Infinite recursion of typedef substitution
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.cp / hang.exp
index 61bcf41b8f01c8bb949042d12c537e5f03d56562..269df815c2ac0c1bb7eec25d70d3e9b7bf85cdfa 100644 (file)
@@ -1,4 +1,4 @@
-#   Copyright 2002, 2004, 2007, 2008 Free Software Foundation, Inc.
+#   Copyright 2002-2019 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/>.
 
-if $tracelevel then {
-       strace $tracelevel
-}
-
-set prms_id 0
-set bug_id 0
 
 if { [skip_cplus_tests] } { continue }
 
-set testfile hang
-set binfile ${objdir}/${subdir}/${testfile}
-
-foreach file {hang1 hang2 hang3} {
-    if {[gdb_compile "${srcdir}/${subdir}/${file}.cc" "${file}.o" object {c++ debug}] != ""} {
-        untested hang.exp
-        return -1
-    }
-}
+standard_testfile hang1.cc hang2.cc hang3.cc
 
-if {[gdb_compile "hang1.o hang2.o hang3.o" ${binfile} executable {c++ debug}] != "" } {
-     untested hang.exp
-     return -1
+if {[prepare_for_testing "failed to prepare" $testfile \
+        [list $srcfile $srcfile2 $srcfile3] {debug c++}]} {
+    return -1
 }
 
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-
 # As of May 1, 2002, GDB hangs trying to read the debug info for the
 # `hang2.o' compilation unit from the executable `hang', when compiled
 # by g++ 2.96 with STABS debugging info.  Here's what's going on, as
@@ -79,8 +58,8 @@ gdb_load ${binfile}
 #
 # Since `hang2.o''s psymtab lists `hang1.o' as a dependency, GDB first
 # reads `hang1.o''s symbols.  When GDB sees `(1,3)=xsB:', it creates a
-# type object for `struct B', sets its TYPE_FLAG_STUB flag, and
-# records it as type number `(1,3)'.
+# type object for `struct B', sets its TYPE_STUB flag, and records it
+# as type number `(1,3)'.
 #
 # When GDB finds the definition of `struct C::B', since the stabs
 # don't indicate that the type is nested within C, it treats it as
This page took 0.024902 seconds and 4 git commands to generate.