warn if "source" fails to open the file when from_tty == 0
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / so-indr-cl.exp
index e37878e4a6b2aa76221bc5694d58a4d89d550f63..5764d03a86594069b1f68e454a372fc69704f646 100644 (file)
@@ -1,28 +1,18 @@
-#   Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+#   Copyright 1997-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.  */
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
+# 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
 
 # are we on a target board
 if ![isnative] then {
@@ -33,15 +23,16 @@ if ![isnative] then {
 # that we use HP-UX-specific compiler & linker options to build
 # the testcase.
 #
-setup_xfail "*-*-*"
-clear_xfail "hppa*-*-*hpux*"
+if {! [istarget "hppa*-*-*hpux*"] } {
+    return
+}
 
 set libfile "solib"
 set testfile "so-indr-cl"
 set srcfile ${testfile}.c
 set binfile ${objdir}/${subdir}/${testfile}
 
-if [get_compiler_info ${binfile}] {
+if [get_compiler_info] {
     return -1
 }
 
@@ -51,13 +42,8 @@ if [get_compiler_info ${binfile}] {
 #remote_exec build "$CC -g +z -c ${libfile}1.c -o ${libfile}1.o"
 
 
-if {$gcc_compiled == 0} {
-    if [istarget "hppa*-hp-hpux*"] then {
-       set additional_flags "additional_flags=+z"
-    } else {
-       # don't know what the compiler is...
-       set additional_flags ""
-    }
+if {$hp_cc_compiler || $hp_aCC_compiler} {
+    set additional_flags "additional_flags=+z"
 } else {
     set additional_flags "additional_flags=-fpic"
 }
@@ -77,13 +63,8 @@ if [istarget "hppa*-hp-hpux*"] then {
 #remote_exec build "$CC -Aa -g ${srcfile} ${libfile}1.sl -o ${binfile}"
 
 
-if {$gcc_compiled == 0} {
-    if [istarget "hppa*-hp-hpux*"] then {
-       set additional_flags "additional_flags=-Ae"
-    } else {
-       # don't know what the compiler is, hope for the best, maybe it's ANSI...
-       set additional_flags ""
-    }
+if {$hp_cc_compiler} {
+    set additional_flags "additional_flags=-Ae"
 } else {
     set additional_flags ""
 }
@@ -119,6 +100,8 @@ send_gdb "break solib_main\n"
 gdb_expect {
   -re "Cannot break on solib_main without a running program.*$gdb_prompt $"\
           {pass "break on indirect solib call before running"}
+  -re "Breakpoint.*deferred.*\\(\"solib_main\" was not found.*$gdb_prompt $"\
+         {pass "break on indirect solib call before running 2"}
   -re "$gdb_prompt $"\
           {fail "break on indirect solib call before running"}
   timeout {fail "(timeout) break on indirect solib call before running"}
This page took 0.025926 seconds and 4 git commands to generate.