2013-07-02 Luis Machado * gdb.base/dump.exp: Update copyright line. Remove arch-specific tests and do a generic pointer size check to set is64bitonly correctly. Index: testsuite/gdb.base/dump.exp =================================================================== --- testsuite/gdb.base/dump.exp (revision 415809) +++ testsuite/gdb.base/dump.exp (working copy) @@ -1,4 +1,4 @@ -# Copyright 2002, 2004, 2007-2012 Free Software Foundation, Inc. +# Copyright 2002, 2004, 2007-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 @@ -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,22 @@ gdb_load ${binfile} +# Decide if we should test SREC, IHEX and TEKHEX formats. +if {![istarget "alpha*-*-*"]} then { + # Check the size of a function pointer and of a data pointer. If + # both are different from 4-bytes, we probably have 64-bit + # addresses that are not supported by SREC, IHEX and TEKHEX. We + # skip those tests then. + # If we error out below, we use the defaults (8 bytes) and skip + # the SREC, IHEX and TEKHEX tests just to be safe. + + set sizeof_function_ptr [get_sizeof "void (*)(void)" 8] + set sizeof_data_ptr [get_sizeof "void *" 8] + if {${sizeof_function_ptr} != 4 && ${sizeof_data_ptr} != 4} 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"