# This testcase is part of GDB, the GNU debugger.
-# Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2007, 2008, 2009
-# Free Software Foundation, Inc.
+# Copyright 1997-2004, 2007-2012 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
}
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]
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
#
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'"
# 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*"] || \
gdb_test_char "p/t *(char *)c" "1"
gdb_test_char "p/a *(char *)c" "0x1( <.*>)?"
gdb_test_char "p/f *(char *)c" "1"
-gdb_test_char "p/c *(char *)c" "1 '.1'"
+gdb_test_char "p/c *(char *)c" "1 '.001'"
gdb_test_short "p/x *(short *)s" "" "0x123" ""
gdb_test_short "p/d *(short *)s" "" "291" ""
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"
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"
# 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"
gdb_test "x/o w" "0110642547"
gdb_test "x/t w" "00000001001000110100010101100111"
gdb_test_xptr "x/a" { b "" } { h "" } { w "0x1234567" } { g "0x123456789abcdef" }
-gdb_test "x/c b" "1 '.1'"
+gdb_test "x/c b" "1 '.001'"
if { $sizeof_double == 8 || $sizeof_long_double == 8 } {
gdb_test "x/f &val.oct" "-5.9822653797615723e-120"
} else {
# 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 '.1'.*-89 '.\[0-9\]*'"
+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 {
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 '.1'.*-89 '.\[0-9\]*'"
+gdb_test "x/2bc b" "1 '.001'.*-89 '.\[0-9\]*'"
gdb_test "x/2bf b" "1.*-89"
gdb_test "x/2hx h" "0x0123.*0xa72e"
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"