From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 83583 invoked by alias); 19 Aug 2015 13:34:18 -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 83573 invoked by uid 89); 19 Aug 2015 13:34:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 19 Aug 2015 13:34:17 +0000 Received: from svr-orw-fem-04.mgc.mentorg.com ([147.34.97.41]) by relay1.mentorg.com with esmtp id 1ZS3e4-0000fg-H1 from Luis_Gustavo@mentor.com ; Wed, 19 Aug 2015 06:43:12 -0700 Received: from [172.30.11.178] (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.3.224.2; Wed, 19 Aug 2015 06:34:13 -0700 Message-ID: <55D485D1.8040802@codesourcery.com> Date: Wed, 19 Aug 2015 13:34:00 -0000 From: Luis Machado Reply-To: Luis Machado User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: Pedro Alves , Subject: Re: [PATCH] Guard compile tests from running when unsupported + harden feature support check References: <1439988825-19754-1-git-send-email-lgustavo@codesourcery.com> <55D48179.2030000@redhat.com> In-Reply-To: <55D48179.2030000@redhat.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-08/txt/msg00512.txt.bz2 On 08/19/2015 10:15 AM, Pedro Alves wrote: > On 08/19/2015 01:53 PM, Luis Machado wrote: > >> + if {[skip_compile_feature_tests]} { >> + untested "compile command not supported (could not find libcc1 shared library?)" >> + return -1 >> + } >> + >> # gnu_ifunc (10): error: too many arguments to function 'gnu_ifunc' >> gdb_test_no_output "compile code resultvar = gnu_ifunc_alias (10);" >> > > This one's OK. > >> diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp >> index 56cde7a..fcf9cac 100644 >> --- a/gdb/testsuite/lib/gdb.exp >> +++ b/gdb/testsuite/lib/gdb.exp >> @@ -3005,6 +3005,9 @@ proc skip_compile_feature_tests {} { >> -re "Command not supported on this host\\..*\r\n$gdb_prompt $" { >> set result 1 >> } >> + -re "No compiler support for this language\\.\r\n$gdb_prompt $" { >> + set result 1 >> + } > > This one I'm not so sure. > > I'd suspect that that could happen when e.g., gdb connects to gdbserver and > finds the program stopped at the entry point, and then the current language > ends up set to asm instead of C. But then that would be a test bug and it > would be wrong to skip further testing. > No stopping at the entry point, we run to main. > But please don't make us guess; please expand on when do you see this. It is related to how the binaries are built, without debug info. That's how GDB reacts to these GCC 5.2-produced binaries. compile-ifunc.exp: #0 0x100007b0 in main () (gdb) show language show language The current source language is "auto; currently asm". compile-ops.exp: Breakpoint 1, 0x10000724 in func (param=268503652, optimized_out=)^M (gdb) compile code -- ;^M No compiler support for this language.^M show language The current source language is "auto; currently asm". Enabling debug info i see the standard error about missing libcc1, which may be an alternate fix, though checking for unsupported languages does sound useful to me.