2013-07-03 Luis Machado * gdb.base/dump.exp: Remove arch-specific tests and do a generic data address check to set is64bitonly correctly. Index: gdb/testsuite/gdb.base/dump.exp =================================================================== --- gdb/testsuite/gdb.base/dump.exp (revision 415997) +++ gdb/testsuite/gdb.base/dump.exp (working copy) @@ -32,16 +32,6 @@ lappend options "additional_flags=-Wl,-taso" } -if {[istarget "ia64*-*-*"] || [istarget "hppa64-*-*"]} then { - set is64bitonly "yes" -} - -if {[istarget "spu*-*-*"]} then { - # The internal address format used for the combined Cell/B.E. - # debugger requires 64-bit. - set is64bitonly "yes" -} - if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable ${options}] != "" } { untested dump.exp return -1 @@ -58,6 +48,15 @@ gdb_load ${binfile} +# Check the address of a variable. If it is bigger than 32-bit, +# assume our target has 64-bit addresses that are not supported by SREC, +# IHEX and TEKHEX. We skip those tests then. +set max_32bit_address "0xffffffff" +set data_address [get_hexadecimal_valueof "&intarray" 0x100000000] +if {${data_address} > ${max_32bit_address}} then { + set is64bitonly "yes" +} + # Clean up any stale output files from previous test runs remote_exec build "rm -f intarr1.bin intarr1b.bin intarr1.ihex intarr1.srec intarr1.tekhex intarr2.bin intarr2b.bin intarr2.ihex intarr2.srec intarr2.tekhex intstr1.bin intstr1b.bin intstr1.ihex intstr1.srec intstr1.tekhex intstr2.bin intstr2b.bin intstr2.ihex intstr2.srec intstr2.tekhex intarr3.srec"