-# Copyright (C) 2002 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
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-if $tracelevel then {
- strace $tracelevel
-}
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
-set prms_id 0
-set bug_id 0
if { [skip_cplus_tests] } { continue }
-set testfile hang
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile hang1.cc hang2.cc hang3.cc
-foreach file {hang1 hang2 hang3} {
- if {[gdb_compile "${srcdir}/${subdir}/${file}.C" "${file}.o" object {c++ debug}] != ""} {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
- }
+if {[prepare_for_testing "failed to prepare" $testfile \
+ [list $srcfile $srcfile2 $srcfile3] {debug c++}]} {
+ return -1
}
-if {[gdb_compile "hang1.o hang2.o hang3.o" ${binfile} executable {c++ debug}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-
-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
#
# 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