From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30079 invoked by alias); 26 Jul 2004 17:31:13 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 30042 invoked from network); 26 Jul 2004 17:31:11 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 26 Jul 2004 17:31:11 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i6QHVBe1031953 for ; Mon, 26 Jul 2004 13:31:11 -0400 Received: from pobox.surrey.redhat.com (pobox.surrey.redhat.com [172.16.10.17]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i6QHVAa01396; Mon, 26 Jul 2004 13:31:10 -0400 Received: from [172.31.0.98] (vpnuser2.surrey.redhat.com [172.16.9.2]) by pobox.surrey.redhat.com (8.12.8/8.12.8) with ESMTP id i6QHV7hp006841; Mon, 26 Jul 2004 18:31:08 +0100 Message-ID: <41054231.7010006@redhat.com> Date: Mon, 26 Jul 2004 17:31:00 -0000 From: Nick Clifton User-Agent: Mozilla Thunderbird 0.7 (X11/20040615) MIME-Version: 1.0 To: Michael Chastain CC: gdb-patches@sources.redhat.com Subject: Re: RFA/RFC: Change Sparc64 gdb.asm tests to use -gdwarf2 instead of -gstabs References: <41051014.nailLY111456S@mindspring.com> In-Reply-To: <41051014.nailLY111456S@mindspring.com> Content-Type: multipart/mixed; boundary="------------070602060401050101000206" X-SW-Source: 2004-07/txt/msg00364.txt.bz2 This is a multi-part message in MIME format. --------------070602060401050101000206 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 2942 Hi Michael, > Not approved. *sob* :-) > You stepped into one of the test suite cow pies ... sorry about that. > > Instead of hard-wiring the debug format, the test should use the > value of debug_flags. Copy this bit of code from lib/ada.exp > (which was copied from default_target_compile): Cool - I have adapted your suggested code slightly (see attached patch). > It would be nice if the assembler supported "-g" with a good default > value. But it doesn't. So we have to keep all the existing > per-architecture code to choose between -gdwarf-2 and -gstabs, with the > override at the end. Those darn lazy binutils maintainers. What do they think that they are doing ? Oh wait, I am binutils maintainer. :-) Guess I should look into this... > Also ... how did this ever work on sparc64 with stabs? I thought that > stabs and stabs+ have never worked on 64-bit machines! Am I missing a > clue? Ah well now that I cannot answer. I just came into the middle of this, trying to answer my manager's question of "are these testsuite failures significant ?" I do not know if Sparc64 + STABS has ever worked, but I assumed that since it was explicitly set that way in asm-source.exp that somebody, in the past, has thought that it did work. > If there is a bug report filed for the bug, then the test can > return XFAIL or KFAIL with the PR number (XFAIL for a PR against > the assembler, KFAIL for a PR against gdb). AFAIK there is no such bug report. Although there is a related one about the generation of aligned and unaligned relocs for the Sparc. > Lastly, you have to test the patch, and say how you tested it > (obviously by running asm-source.exp on a sparc64). > Please test with all three of: > > runtest > runtest --target_board unix/gdb:debug_flags=dwarf-2 > runtest --target_board unix/gdb:debug_flags=stabs+ OK I ran those tests, although I changed the flags to be "-gdwarf2" and "-gstabs+". I also added "gdb.asm/asm-source.exp" to the command lines, since I assumed that it was OK to just run the assembler tests. The patch does not affect any other part of the GDB testsuite. I ran the tests on an x86 native host and a Sparc64 native host, just to make sure that the default selection code worked as well. There was only one combination that produced any failures: Sparc64 native with -gstabs+ Which of course was the whole point of this patch in the first place. So - can I apply this version of the patch please ? Cheers Nick gdb/testsuite/ChangeLog 2004-07-26 Nick Clifton * gdb.asm/asm-source.exp (debug-flags): New variable. If a known good default value for a specific architecture is available then set it to that value. Otherwise default to the -gstabs switch. Remove the -g... switches from the asm-flags variable. Allow the target board info to override the value if it wants to. Pass the switch on the assembler command line. --------------070602060401050101000206 Content-Type: text/plain; name="asm-source.exp.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="asm-source.exp.patch" Content-length: 5433 Index: gdb/testsuite/gdb.asm/asm-source.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.asm/asm-source.exp,v retrieving revision 1.50 diff -c -3 -p -r1.50 asm-source.exp *** gdb/testsuite/gdb.asm/asm-source.exp 25 May 2004 04:07:05 -0000 1.50 --- gdb/testsuite/gdb.asm/asm-source.exp 26 Jul 2004 17:14:38 -0000 *************** set asm-arch "" *** 35,47 **** set asm-note "empty" set asm-flags "" set link-flags "--entry _start" switch -glob -- [istarget] { "alpha*-*-*" { set asm-arch alpha # ??? Won't work with ecoff systems like Tru64, but then we also # don't have any other -g flag that creates mdebug output. ! set asm-flags "-gdwarf2 -no-mdebug -I${srcdir}/${subdir} -I${objdir}/${subdir}" } "*arm-*-*" { set asm-arch arm --- 35,49 ---- set asm-note "empty" set asm-flags "" set link-flags "--entry _start" + set debug-flags "" switch -glob -- [istarget] { "alpha*-*-*" { set asm-arch alpha # ??? Won't work with ecoff systems like Tru64, but then we also # don't have any other -g flag that creates mdebug output. ! set asm-flags "-no-mdebug -I${srcdir}/${subdir} -I${objdir}/${subdir}" ! set debug-flags "-gdwarf-2" } "*arm-*-*" { set asm-arch arm *************** switch -glob -- [istarget] { *** 63,69 **** } "x86_64-*-*" { set asm-arch x86_64 ! set asm-flags "-gdwarf2 -I${srcdir}/${subdir} -I${objdir}/${subdir}" } "i\[3456\]86-*-*" { set asm-arch i386 --- 65,72 ---- } "x86_64-*-*" { set asm-arch x86_64 ! set asm-flags "-I${srcdir}/${subdir} -I${objdir}/${subdir}" ! set debug-flags "-gdwarf-2" } "i\[3456\]86-*-*" { set asm-arch i386 *************** switch -glob -- [istarget] { *** 88,105 **** } "sh*-*-*" { set asm-arch sh ! set asm-flags "-gdwarf2 -I${srcdir}/${subdir} -I${objdir}/${subdir}" } "sparc-*-*" { set asm-arch sparc } "sparc64-*-*" { set asm-arch sparc64 ! set asm-flags "-xarch=v9 -gstabs -I${srcdir}/${subdir} -I${objdir}/${subdir}" } "xstormy16-*-*" { set asm-arch xstormy16 ! set asm-flags "-gdwarf2 -I${srcdir}/${subdir} -I${objdir}/${subdir}" } "v850-*-*" { set asm-arch v850 --- 91,111 ---- } "sh*-*-*" { set asm-arch sh ! set asm-flags "-I${srcdir}/${subdir} -I${objdir}/${subdir}" ! set debug-flags "-gdwarf-2" } "sparc-*-*" { set asm-arch sparc } "sparc64-*-*" { set asm-arch sparc64 ! set asm-flags "-xarch=v9 -I${srcdir}/${subdir} -I${objdir}/${subdir}" ! set debug-flags "-gdwarf-2" } "xstormy16-*-*" { set asm-arch xstormy16 ! set asm-flags "-I${srcdir}/${subdir} -I${objdir}/${subdir}" ! set debug-flags "-gdwarf-2" } "v850-*-*" { set asm-arch v850 *************** switch -glob -- [istarget] { *** 110,120 **** } "ia64-*-*" { set asm-arch ia64 ! set asm-flags "-gdwarf2 -I${srcdir}/${subdir} -I${objdir}/${subdir}" } "hppa*-linux-*" { set asm-arch pa ! set asm-flags "-gdwarf2 -I${srcdir}/${subdir} -I${objdir}/${subdir}" } } --- 116,128 ---- } "ia64-*-*" { set asm-arch ia64 ! set asm-flags "-I${srcdir}/${subdir} -I${objdir}/${subdir}" ! set debug-flags "-gdwarf-2" } "hppa*-linux-*" { set asm-arch pa ! set asm-flags "-I${srcdir}/${subdir} -I${objdir}/${subdir}" ! set debug-flags "-gdwarf-2" } } *************** remote_exec build "rm -f ${subdir}/note. *** 161,173 **** remote_download host ${srcdir}/${subdir}/${asm-note}.inc ${subdir}/note.inc if { "${asm-flags}" == "" } { ! set asm-flags "-gstabs -I${srcdir}/${subdir} -I${objdir}/${subdir}" } ! if {[target_assemble ${srcdir}/${subdir}/${srcfile1} asmsrc1.o "${asm-flags}"] != ""} then { gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." } ! if {[target_assemble ${srcdir}/${subdir}/${srcfile2} asmsrc2.o "${asm-flags}"] != ""} then { gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." } --- 169,192 ---- remote_download host ${srcdir}/${subdir}/${asm-note}.inc ${subdir}/note.inc if { "${asm-flags}" == "" } { ! set asm-flags "-I${srcdir}/${subdir} -I${objdir}/${subdir}" ! set debug-flags "-gstabs" } ! # Allow the target board to override the debug flags ! if { [board_info $dest exists debug_flags] } then { ! set debug-flags "[board_info $dest debug_flags]" ! } ! ! # The GNU assembler does not support STABS+ ! if { ${debug-flags} == "-gstabs+" } then { ! set debug-flags "-gstabs" ! } ! ! if {[target_assemble ${srcdir}/${subdir}/${srcfile1} asmsrc1.o "${asm-flags} ${debug-flags}"] != ""} then { gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." } ! if {[target_assemble ${srcdir}/${subdir}/${srcfile2} asmsrc2.o "${asm-flags} ${debug-flags}"] != ""} then { gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." } --------------070602060401050101000206--