Switch the license of all .exp files to GPLv3.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / scope.exp
index 49386d2899d6833e4930e2c487889436a820c5a7..71285c7a6280667e74059ee88a90ddbacced2d70 100644 (file)
@@ -1,19 +1,18 @@
-# Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003,
-# 2004 Free Software Foundation, Inc.
+# Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004,
+# 2007 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/>.
 
 # Please email any bugs, comments, and/or additions to this file to:
 # bug-gdb@prep.ai.mit.edu
@@ -32,15 +31,18 @@ set binfile ${objdir}/${subdir}/${testfile}
 
 
 if  { [gdb_compile "${srcdir}/${subdir}/scope0.c" "${binfile}0.o" object {debug}] != "" } {
-     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+     untested scope.exp
+     return -1
 }
 
 if  { [gdb_compile "${srcdir}/${subdir}/scope1.c" "${binfile}1.o" object {debug}] != "" } {
-     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+     untested scope.exp
+     return -1
 }
 
 if  { [gdb_compile "${binfile}0.o ${binfile}1.o" ${binfile} executable {debug}] != "" } {
-     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+     untested scope.exp
+     return -1
 }
 
 # Create and source the file that provides information about the compiler
@@ -61,22 +63,12 @@ proc test_at_main {} {
     global subdir
     global hp_cc_compiler
 
-    # skip past init.  There may be a call to __main at the start of
-    # main, so the first next may only get us to the init0 call.
-    gdb_test_multiple "next" "next over init0() in main" {
-       -re "$decimal.*foo \\(\\).*$gdb_prompt $" {
-           pass "next over init0() in main"
-       }
-       -re "$decimal.*init0 \\(\\).*$gdb_prompt $" {
-           send_gdb "next\n"
-           exp_continue
-       }
-       -re ".*$gdb_prompt $" {
-           fail "next over init0() in main"
-           gdb_suppress_tests
-       }
-    }
-
+    # skip past init0.
+    # This used to do an extra "next" if the first one didn't get us
+    # over the call to init0, to handle calls to __main in the
+    # prologue, etc.  But if a breakpoint at main doesn't leave us on
+    # the first line of real code in the function, that's a GDB bug.
+    gdb_test "next" "$decimal.*foo \\(\\);" "next over init0() in main"
 
     # Print scope0.c::filelocal, which is 1
 
This page took 0.024821 seconds and 4 git commands to generate.