From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12518 invoked by alias); 2 Jul 2013 18:50:52 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 12493 invoked by uid 89); 2 Jul 2013 18:50:47 -0000 X-Spam-SWARE-Status: No, score=-4.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL autolearn=ham version=3.3.1 Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 02 Jul 2013 18:50:46 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1Uu5f2-0003AB-7C from Luis_Gustavo@mentor.com ; Tue, 02 Jul 2013 11:50:44 -0700 Received: from NA1-MAIL.mgc.mentorg.com ([147.34.98.181]) by svr-orw-fem-01.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 2 Jul 2013 11:50:43 -0700 Received: from [172.30.15.158] ([172.30.15.158]) by NA1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 2 Jul 2013 11:50:43 -0700 Message-ID: <51D32100.4000901@codesourcery.com> Date: Tue, 02 Jul 2013 18:50:00 -0000 From: Luis Machado Reply-To: lgustavo@codesourcery.com User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130623 Thunderbird/17.0.7 MIME-Version: 1.0 To: Tom Tromey CC: Stan Shebs , gdb-patches@sourceware.org Subject: Re: [PATCH, testsuite] Don't run SREC, IHEX and TEKHEX tests for MIPS N64. References: <51D1AD43.3060904@codesourcery.com> <8761wsgb8i.fsf@fleche.redhat.com> <51D3050C.4070309@codesourcery.com> <51D30BB0.3050906@earthlink.net> <87wqp8estz.fsf@fleche.redhat.com> In-Reply-To: <87wqp8estz.fsf@fleche.redhat.com> Content-Type: multipart/mixed; boundary="------------010909010709060801020109" X-Virus-Found: No X-SW-Source: 2013-07/txt/msg00090.txt.bz2 This is a multi-part message in MIME format. --------------010909010709060801020109 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 631 On 07/02/2013 03:10 PM, Tom Tromey wrote: >>> It could be, if we can guarantee oddball architectures don't use >>> pointers and addresses of strange sizes, say, an arch that declares >>> function pointers of 4 bytes. > > Stan> You could test both a function address and a data address, and if either > Stan> is greater than 4 bytes, the old formats can be excluded from testing. > > FWIW I'm actually ok with the original patch as well. > So if Stan is happy with it, it is ok. What about this one? I feel i repeated myself in the comments a little, in an attempt to make things clear. It may sound like a broken LP. :-) Luis --------------010909010709060801020109 Content-Type: text/x-patch; name="dump_mips.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="dump_mips.diff" Content-length: 2251 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" --------------010909010709060801020109--