gdb:
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / long_long.exp
index ca315b60c10144936c2694bb73880e31987daabd..9162f6a2155e25165ca4d4975a00ff50500b16ed 100644 (file)
@@ -1,7 +1,7 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2007, 2008
-# Free Software Foundation, Inc.
+# Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2007, 2008, 2009,
+# 2010, 2011 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
@@ -61,39 +61,8 @@ if { ![runto known_types] } then {
    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.
 
-proc get_valueof { fmt exp default } {
-    global gdb_prompt
-    send_gdb "print${fmt} ${exp}\n"
-    gdb_expect {
-       -re "\\$\[0-9\]* = (\[-\]*\[0-9\]*).*$gdb_prompt $" {
-           set val $expect_out(1,string)
-           pass "get value of ${exp} ($val)"
-       }
-       timeout {
-           set size ${default}
-           fail "get value of ${exp} (timeout)"
-       }
-    }
-    return ${val}
-}
-
-proc get_sizeof { type default } {
-    return [get_valueof "/d" "sizeof (${type})" $default]
-}
-
 set sizeof_char [get_sizeof "char" 1]
 set sizeof_short [get_sizeof "short" 2]
 set sizeof_int [get_sizeof "int" 4]
@@ -116,23 +85,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
 
@@ -195,7 +154,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'"
@@ -206,10 +165,9 @@ 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*-*-*"]) \
+    if { ([istarget "arm*-*-*"]) \
         && !([istarget "*-*-*eabi"] || \
+             [istarget "*-*-mingw32ce*"] || \
              [istarget "*-*-openbsd*"] || \
              [istarget "*-*-symbianelf"]) } then {
        # assume the long long represents a floating point double in ARM format
@@ -247,7 +205,7 @@ gdb_test_int "p/u *(int *)i" "" "291" "19088743" ""
 gdb_test_int "p/o *(int *)i" "" "0443" "0110642547" ""
 gdb_test_int "p/t *(int *)i" "" "100100011" "1001000110100010101100111" ""
 gdb_test_int "p/a *(int *)i" "" "" "0x1234567" ""
-gdb_test_int "p/f *(int *)i" "" "291" "2.99881655e-38" ""
+gdb_test_int "p/f *(int *)i" "" "291" "2.99881655e-0?38" ""
 gdb_test_int "p/c *(int *)i" "" "35 '.'" "103 'g'" ""
 
 gdb_test_long "p/x *(long *)l" "" "0x123" "0x1234567" "0x123456789abcdef"
@@ -256,7 +214,7 @@ gdb_test_long "p/u *(long *)l" "" "291" "19088743" "81985529216486895"
 gdb_test_long "p/o *(long *)l" "" "0443" "0110642547" "04432126361152746757"
 gdb_test_long "p/t *(long *)l" "" "100100011" "1001000110100010101100111" "100100011010001010110011110001001101010111100110111101111"
 gdb_test_ptr "p/a *(long *)l" "" "" "0x1234567" "0x123456789abcdef"
-gdb_test_long "p/f *(long *)l" "" "291" "2.99881655e-38" "3.5127005640885037e-303"
+gdb_test_long "p/f *(long *)l" "" "291" "2.99881655e-0?38" "3.5127005640885037e-303"
 gdb_test_long "p/c *(long *)l" "" "35 '.'" "103 'g'" "-17 '.*'"
 
 gdb_test_long_long "p/x *(long long *)ll" "" "" "" "0x123456789abcdef"
@@ -270,7 +228,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"
@@ -286,14 +244,14 @@ 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"
 gdb_test "x/2o g" "04432126361152746757.*01234567123456701234567"
 gdb_test "x/2t g" "0000000100100011010001010110011110001001101010111100110111101111.*1010011100101110111001010011100101110111000001010011100101110111"
 gdb_test_xptr "x/2a" { b "" } { h "" } { w "0x1234567.*0xa72ee539" } { g "0x123456789abcdef.*0xa72ee53977053977" }
-gdb_test "x/2c b" "1 '.001'.*-89 '.'"
+gdb_test "x/2c b" "1 '.001'.*-89 '.\[0-9\]*'"
 if { $sizeof_double == 8 || $sizeof_long_double == 8 } {
     gdb_test "x/2f &val.oct" "-5.9822653797615723e-120.*-5.9041889495880968e-100"
 } else {
@@ -308,7 +266,7 @@ gdb_test "x/2bu b" "1.*167"
 gdb_test "x/2bo b" "01.*0247"
 gdb_test "x/2bt b" "00000001.*10100111"
 gdb_test_ptr "x/2ba b" "" "" "0x1.*0xffffffa7" "0x1.*0xffffffffffffffa7"
-gdb_test "x/2bc b" "1 '.001'.*-89 '.'"
+gdb_test "x/2bc b" "1 '.001'.*-89 '.\[0-9\]*'"
 gdb_test "x/2bf b" "1.*-89"
 
 gdb_test "x/2hx h" "0x0123.*0xa72e"
@@ -327,7 +285,7 @@ gdb_test "x/2wo w" "0110642547.*024713562471"
 gdb_test "x/2wt w" "00000001001000110100010101100111.*10100111001011101110010100111001"
 gdb_test_ptr "x/2wa w" "" ""  "0x1234567.*0xa72ee539" "0x1234567.*0xffffffffa72ee539"
 gdb_test "x/2wc w" "103 'g'.*57 '9'"
-gdb_test "x/2wf w" "2.99881655e-38.*-2.42716126e-15"
+gdb_test "x/2wf w" "2.99881655e-0?38.*-2.42716126e-0?15"
 
 gdb_test "x/2gx g" "0x0123456789abcdef.*0xa72ee53977053977"
 gdb_test "x/2gd g" "81985529216486895.*-6399925985474168457"
@@ -335,7 +293,7 @@ gdb_test "x/2gu g" "81985529216486895.*12046818088235383159"
 gdb_test "x/2go g" "04432126361152746757.*01234567123456701234567"
 gdb_test "x/2gt g" "0000000100100011010001010110011110001001101010111100110111101111.*1010011100101110111001010011100101110111000001010011100101110111"
 gdb_test_ptr "x/2ga g" "" "" "0x89abcdef.*0x77053977" "0x123456789abcdef.*0xa72ee53977053977"
-gdb_test "x/2gc g" "-17 '.'.*119 'w'"
+gdb_test "x/2gc g" "-17 '.\[0-9\]*'.*119 'w'"
 gdb_test "x/2gf g" "3.5127005640885037e-303.*-5.9822653797615723e-120"
 
 gdb_exit
This page took 0.028755 seconds and 4 git commands to generate.