From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 67497385741C for ; Thu, 21 Apr 2022 13:39:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 67497385741C Received: from [172.16.0.95] (192-222-180-24.qc.cable.ebox.net [192.222.180.24]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 9C5B01E01D; Thu, 21 Apr 2022 09:39:33 -0400 (EDT) Message-ID: <8f0ddc69-6cbd-14f6-8bb9-a3d3fb963493@simark.ca> Date: Thu, 21 Apr 2022 09:39:33 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH] Fix for gdb.base/solib-search.exp test. Content-Language: tl To: Carl Love , dje@google.com, gdb-patches@sourceware.org Cc: Rogerio Alves References: <8fe6f3bee129c0a3159d3ef57c942b9473255d8d.camel@us.ibm.com> From: Simon Marchi In-Reply-To: <8fe6f3bee129c0a3159d3ef57c942b9473255d8d.camel@us.ibm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-15.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org 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: , X-List-Received-Date: Thu, 21 Apr 2022 13:39:35 -0000 On 2022-03-22 17:49, Carl Love via Gdb-patches wrote: > > GDB maintainers: > > The following patch fixes the setting of the variable right_lib_flags > in the solib-search.exp test. With the fix the test now run correctly > on Powerpc. > > The patch has been tested on a Power 10 system. > > Please let me know if the patch is acceptable for mainline gdb. > Thanks. > > Carl Love > > --------------------------------------------------- > Fix for gdb.base/solib-search.exp test. > > The variable right_lib_flags is not being set correctly to define RIGHT. > The value RIGHT is needed to force the address of the library functions > lib1_func3 and lib2_func4 to occur at different address in the wrong and > right libraries. > > With RIGHT defined correctly, functions lib1_func3 and lib2_func4 occur > at different addresses the test runs correctly on Powerpc. > --- > gdb/testsuite/gdb.base/solib-search.exp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gdb/testsuite/gdb.base/solib-search.exp b/gdb/testsuite/gdb.base/solib-search.exp > index eaabe508bf0..202e79d85de 100644 > --- a/gdb/testsuite/gdb.base/solib-search.exp > +++ b/gdb/testsuite/gdb.base/solib-search.exp > @@ -54,7 +54,7 @@ set binfile2_lib [standard_output_file ${libname2}.so] > > set lib_flags [list debug ldflags=-Wl,-Bsymbolic] > set wrong_lib_flags "$lib_flags additional_flags=-DARRAY_SIZE=1" > -set right_lib_flags "$lib_flags additional_flags=-DARRAY_SIZE=8192 -DRIGHT" > +set right_lib_flags "$lib_flags additional_flags=-DARRAY_SIZE=8192 additional_flags=-DRIGHT" Hi Carl, Intuitively, this looks good. But I'd like to understand why this fails on PPC but not x86-64. Can you show the failure that you see? It's also a good idea to put it in the commit log for future reference. You can paste the FAIL line that you get before the patch, and the PASS line that you get after the patch. Include the relevant lines from gdb.log just before those, so we can see what changed between before and after. Simon