* gas/config/tc-avr.c: Change ISA for devices with USB support to
[external/binutils.git] / gdb / testsuite / gdb.cp / psmang.exp
index b137379..f26430a 100644 (file)
@@ -1,18 +1,17 @@
-# Copyright 2002, 2004 Free Software Foundation, Inc.
+# Copyright 2002-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
-# 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.  
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # This file is part of the gdb testsuite
 
 # other ways this test could fail to do its job.  If you need to make
 # revisions, please be very careful.
 
-if $tracelevel then {
-    strace $tracelevel
-}
-
 #
 # test running programs
 #
 
-set prms_id 0
-set bug_id 0
 
 if { [skip_cplus_tests] } { continue }
 
-set testfile "psmang"
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile psmang1.cc psmang2.cc
 
-if [get_compiler_info ${binfile} "c++"] {
-    return -1;
+if [get_compiler_info "c++"] {
+    return -1
 }
 
-if  { [gdb_compile "${srcdir}/${subdir}/${testfile}1.cc" "${testfile}1.o" object {debug c++}] != "" } {
-     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+if {[prepare_for_testing $testfile.exp $testfile \
+        [list $srcfile $srcfile2] {debug c++}]} {
+    return -1
 }
 
-if  { [gdb_compile "${srcdir}/${subdir}/${testfile}2.cc" "${testfile}2.o" object {debug c++}] != "" } {
-     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-if  { [gdb_compile "${testfile}1.o ${testfile}2.o" ${binfile} executable {debug c++}] != "" } {
-     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}
-
 gdb_test "break s::method1" "Breakpoint .* at .*: file .*psmang1.cc.*"
 
 # We have to exit and restart GDB here, to make sure that all the
 # compilation units are psymtabs again.
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+clean_restart ${binfile}
 
 gdb_test "break s::method2" "Breakpoint .* at .*: file .*psmang2.cc.*"