From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 51GrABblEmDmdgAAWB0awg (envelope-from ) for ; Thu, 28 Jan 2021 11:23:50 -0500 Received: by simark.ca (Postfix, from userid 112) id EFA911EF80; Thu, 28 Jan 2021 11:23:49 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 9D8E61E945 for ; Thu, 28 Jan 2021 11:23:49 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 49F81385041D; Thu, 28 Jan 2021 16:23:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 49F81385041D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1611851029; bh=KLe/2neGNlfmjP56devEKdgsQTyicSSrOV8kmVMK56w=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=ycIWwiVKS01HRcKe3KgB01vGZRnczcjTafYItmAUWUYF6DIkmXlRRzh1/n0V2aLrY Q0QPl1VAMr/MNZzNSkKfM+CdBd/MOrpChyV221FwbMo3mbaEFd7q5mdd1dDC8E1pUM Y9lwXyl/P3iB1YnqkA27YScpfQXyUPaFvnm9RlVA= Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 60EE8385800F for ; Thu, 28 Jan 2021 16:23:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 60EE8385800F Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 10SGNePl023546 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 28 Jan 2021 11:23:45 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 10SGNePl023546 Received: from [10.0.0.11] (192-222-157-6.qc.cable.ebox.net [192.222.157.6]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id C5FA11E945; Thu, 28 Jan 2021 11:23:40 -0500 (EST) Subject: Re: [PATCH][gdb/testsuite] Fix g0 search in gdb.arch/i386-sse-stack-align.exp To: Tom de Vries , gdb-patches@sourceware.org References: <20210126180330.GA7889@delia> <9ebc1864-3bd3-cc10-b327-e8f3d37e8c15@polymtl.ca> Message-ID: <7b80371a-da7e-6db7-e100-1c82ce915739@polymtl.ca> Date: Thu, 28 Jan 2021 11:23:40 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Thu, 28 Jan 2021 16:23:40 +0000 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Simon Marchi via Gdb-patches Reply-To: Simon Marchi Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 2021-01-28 11:21 a.m., Tom de Vries wrote: > On 1/28/21 4:04 PM, Simon Marchi wrote: >> >> >> On 2021-01-26 1:03 p.m., Tom de Vries wrote: >>> Hi, >>> >>> When running test-case gdb.arch/i386-sse-stack-align.exp on target board >>> unix/-m32, I run into: >>> ... >>> (gdb) print (int) g0 ()^M >>> Invalid data type for function to be called.^M >>> (gdb) FAIL: gdb.arch/i386-sse-stack-align.exp: print (int) g0 () >>> ... >>> >>> Gdb is supposed to use minimal symbol g0: >>> ... >>> $ nm i386-sse-stack-align | grep g0 >>> 08049194 t g0 >>> ... >>> but instead it finds a g0 symbol in the debug info of libm, specifically in >>> ./sysdeps/ieee754/ldbl-96/e_lgammal_r.c. >>> >>> Fix this by disabling reading symbols for shared libs. >>> >>> Tested on x86_64-linux. >>> >>> Any comments? >>> >>> Thanks, >>> - Tom >>> >>> [gdb/testsuite] Fix g0 search in gdb.arch/i386-sse-stack-align.exp >>> >>> gdb/testsuite/ChangeLog: >>> >>> 2021-01-26 Tom de Vries >>> >>> * gdb.arch/i386-sse-stack-align.exp: Set auto-solib-add to off. >>> >>> --- >>> gdb/testsuite/gdb.arch/i386-sse-stack-align.exp | 5 +++++ >>> 1 file changed, 5 insertions(+) >>> >>> diff --git a/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp b/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp >>> index 2c1cdd89c70..57dd12f9830 100644 >>> --- a/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp >>> +++ b/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp >>> @@ -37,6 +37,11 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $opts >>> >>> clean_restart $executable >>> >>> +# With libm debug info installed, I get a g0 from >>> +# ./sysdeps/ieee754/ldbl-96/e_lgammal_r.c instead of the local g0. >>> +# Fix this by disabling reading symbols for shared libs. >>> +gdb_test_no_output "set auto-solib-add off" >>> + >>> if ![runto_main] then { >>> return -1 >>> } >>> >> >> Couldn't we simply use some less common, more scoped name? >> > > Yep, that also works. How about this? > > Thanks, > - Tom > > Yep, that LGTM. Simon