warn if "source" fails to open the file when from_tty == 0
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / long_long.exp
index 436ecf99e837796bc9379cc1346a551022397e4a..dcd115e732020baf49ffd6280d5d0cd772689a30 100644 (file)
@@ -1,7 +1,6 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2007, 2008, 2009,
-# 2010 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
 # long_long.exp   Test printing of 64-bit things in 32-bit gdb.
 #                 Also test differnet kinds of formats.
 #
-if $tracelevel then {
-       strace $tracelevel
-}
-
 if [target_info exists no_long_long] {
     return 0
 }
 
-set testfile long_long
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile .c
 
 # What compiler are we using?
 #
-if [get_compiler_info ${binfile}] {
+if [get_compiler_info] {
     return -1
 }
 
@@ -51,27 +44,13 @@ if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [con
 # use this to debug:
 #log_user 1
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+clean_restart ${binfile}
 
 if { ![runto known_types] } then { 
    fail "run to known_types" 
    return 
 }
 
-set target_bigendian_p 1
-send_gdb "show endian\n"
-gdb_expect {
-    -re "little endian.*$gdb_prompt $" { set target_bigendian_p 0 }
-    -re "big endian.*$gdb_prompt $" { }
-    -re "$gdb_prompt $" {
-        fail "getting target endian"
-    }
-    default    { fail "(timeout) getting target endian" }
-}
-
 # Detect the size of the target's basic types.
 
 set sizeof_char [get_sizeof "char" 1]
@@ -96,23 +75,13 @@ proc pat2 { n pats } {
 
 proc gdb_test_xxx { test pat name } {
     if { $pat == "" } {
-       setup_kfail *-*-* gdb/1672
+       setup_kfail gdb/1672 *-*-*
        gdb_test $test "xxx" $name
     } else {
        gdb_test $test $pat $name
     }
 }
 
-proc gdb_test_bi { test be le } {
-    global target_bigendian_p
-
-    if { $target_bigendian_p } {
-       gdb_test_xxx $test $be $test
-    } else {
-       gdb_test_xxx $test $le $test
-    }
-}
-
 proc gdb_test_ptr { test args } {
     global sizeof_data_ptr
 
@@ -175,7 +144,7 @@ gdb_test "p/d val.dec" "-6101065172474983726" "decimal print p/d"
 #
 gdb_test "p/d val.oct" "-6399925985474168457"
 gdb_test "p/u val.oct" "12046818088235383159"
-gdb_test "p/o val.oct" ""
+gdb_test "p/o val.oct" ".*"
 gdb_test "p/t val.oct" "1010011100101110111001010011100101110111000001010011100101110111"
 gdb_test_ptr "p/a val.oct" "" "" "0x77053977" "0xa72ee53977053977"
 gdb_test "p/c val.oct" "'w'"
@@ -186,10 +155,8 @@ if { $sizeof_double == 8 || $sizeof_long_double == 8 } {
     # words swapped in big endian format.
     # EABI targets default to natural-endian VFP format.
 
-    if { ([istarget "arm*-*-*"] || \
-         [istarget "xscale*-*-*"] || \
-         [istarget "strongarm*-*-*"]) \
-        && !([istarget "*-*-*eabi"] || \
+    if { ([istarget "arm*-*-*"]) \
+        && !([istarget "*-*-*eabi*"] || \
              [istarget "*-*-mingw32ce*"] || \
              [istarget "*-*-openbsd*"] || \
              [istarget "*-*-symbianelf"]) } then {
@@ -251,7 +218,7 @@ gdb_test_long_long "p/c *(long long *)ll" "" "" "" "-17 '.*'"
 
 # Implict Word size (except for a, c, and f)
 
-gdb_test "x/w w" "" "set examine size to w"
+gdb_test "x/w w" ".*" "set examine size to w"
 gdb_test "x/x w" "0x01234567"
 gdb_test "x/d w" "19088743"
 gdb_test "x/u w" "19088743"
@@ -267,7 +234,7 @@ if { $sizeof_double == 8 || $sizeof_long_double == 8 } {
 
 # Implict Giant size (except for a, c, and f)
 
-gdb_test "x/g g" "" "set examine size to g"
+gdb_test "x/g g" ".*" "set examine size to g"
 gdb_test "x/2x g" "0x0123456789abcdef.*0xa72ee53977053977"
 gdb_test "x/2d g" "81985529216486895.*-6399925985474168457"
 gdb_test "x/2u g" "81985529216486895.*12046818088235383159"
This page took 0.02621 seconds and 4 git commands to generate.