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 A12DD3834C0A for ; Wed, 7 Dec 2022 15:01:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A12DD3834C0A Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca Received: from [172.16.0.64] (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 3A5661E112; Wed, 7 Dec 2022 10:01:09 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1670425269; bh=dX33plFoiO5ae6ogpqrOk6x3zBLQRaaKXA7JYDE5yrY=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=M3p1rvaL5vRb4JYYFUTn27oEh+89UKrh4KBZGMh/D5NweSMGUibYjqLMftGr32wc1 5zQ32cYisdY8E5snAoYPtsAE8SP8ccRPp+0AUmw2iqzgEA+bEWfUcSGdnRdNS1Eka5 zkw8impG4UiUJYxOHnagQjFpAWAuyglykcbL09Ms= Message-ID: <6677a380-2760-64f8-5729-f8b7adce4c84@simark.ca> Date: Wed, 7 Dec 2022 10:01:08 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: [PATCH] gdb/testsuite: update a pattern in gdb_file_cmd Content-Language: fr To: Enze Li , gdb-patches@sourceware.org Cc: enze.li@gmx.com References: From: Simon Marchi In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.2 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.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 12/7/22 08:06, Enze Li via Gdb-patches wrote: > When building GDB with the following CFLAGS and CXXFLAGS as part of > configure line: > > CFLAGS=-std=gnu11 CXXFLAGS=-std=gnu++11 > > Then run the selftest.exp, I see: > > ====== > Running /home/lee/dev/binutils-gdb/gdb/testsuite/gdb.gdb/selftest.exp > ... > FAIL: gdb.gdb/selftest.exp: run until breakpoint at captured_main > WARNING: Couldn't test self > > === gdb Summary === > > # of unexpected failures 1 > /home/lee/dev/binutils-gdb/gdb/gdb version 13.0.50.20221206-git -nw -nx > -iex "set height 0" -iex "set width 0" -data-directory > /home/lee/dev/binutils-gdb/gdb/testsuite/../data-directory > ====== > > It is the fact that when I use the previously mentioned CFLAGS and > CXXFLAGS as part of the configuration line, the default value (-O2 -g) > is overridden, then GDB has no debug information. When there's no debug > information, GDB should not run the testcase in selftest.exp. > > The root cause of this FAIL is that the $gdb_file_cmd_debug_info didn't > get the right value ("nodebug") during the gdb_file_cmd procedure. > > That's because in this commit, > > commit 3453e7e409f44a79ac6695589836edb8a49bfb08 > Date: Sat May 19 11:25:20 2018 -0600 > > Clean up "Reading symbols" output > > It changed "no debugging..." to "No debugging..." which causes the above > problem. This patch only updates the corresponding pattern to fix this > issue. > > With this patch applied, I see: > > ====== > Running /home/lee/dev/binutils-gdb/gdb/testsuite/gdb.gdb/selftest.exp > ... > > === gdb Summary === > > # of untested testcases 1 > /home/lee/dev/binutils-gdb/gdb/gdb version 13.0.50.20221206-git -nw -nx > -iex "set height 0" -iex "set width 0" -data-directory > /home/lee/dev/binutils-gdb/gdb/testsuite/../data-directory > ====== > > Tested on x86_64-linux. > --- > gdb/testsuite/lib/gdb.exp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp > index e4ce3c30c2ff..008f59b9f30b 100644 > --- a/gdb/testsuite/lib/gdb.exp > +++ b/gdb/testsuite/lib/gdb.exp > @@ -2139,7 +2139,7 @@ proc gdb_file_cmd { arg } { > set gdb_file_cmd_debug_info "lzma" > return 0 > } > - -re "(Reading symbols from.*no debugging symbols found.*$gdb_prompt $)" { > + -re "(Reading symbols from.*No debugging symbols found.*$gdb_prompt $)" { > verbose "\t\tLoaded $arg into $GDB with no debugging symbols" > set gdb_file_cmd_msg $expect_out(1,string) > set gdb_file_cmd_debug_info "nodebug" > > base-commit: 83f18e5ebe627163f744215d3760a8eaacee6ec1 Thanks for the good explanation, I didn't know about all these things. LGTM: Approved-By: Simon Marchi Simon