# 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
}
# 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]
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*-*-*"]) \
- && !([istarget "*-*-*eabi"] || \
+ if { ([istarget "arm*-*-*"]) \
+ && !([istarget "*-*-*eabi*"] || \
[istarget "*-*-mingw32ce*"] || \
[istarget "*-*-openbsd*"] || \
[istarget "*-*-symbianelf"]) } then {
# 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"
# 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"