From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id 4D9B5395C067 for ; Thu, 8 Dec 2022 14:36:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4D9B5395C067 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 7E824225E0; Thu, 8 Dec 2022 14:36:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1670510179; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Yyi+qRuQx26fOAwM6il4JvC2NikQOYDV+jVHvKi1DKY=; b=evUbvTqS9scSa8cPXKDVczrOtAvT0opQBjOPzHjBUgZf+lU2//QSpIpcFgLn5IgmAc3gja iO62VHtLFA5WBdNRotJoX+xv8XsKWDao1ttHVTakPm7/QpSrgKT/dDqWE1sk2aYbsFnuId tviBM8efV5R5vtJhxDLYMwvzPg8TlZo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1670510179; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Yyi+qRuQx26fOAwM6il4JvC2NikQOYDV+jVHvKi1DKY=; b=z8z1XQ+r+4f06NXipF3nEsCo36H7CCm+mnTWVYN3JuIapeooNyjajnM2Pe6T9/8/5a3eTH euvCiFKEjIcDssDQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 501FF13416; Thu, 8 Dec 2022 14:36:19 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id X6yNEmP2kWOEbgAAMHmgww (envelope-from ); Thu, 08 Dec 2022 14:36:19 +0000 Message-ID: <11d7d42a-42e2-456a-a424-7739a8caf373@suse.de> Date: Thu, 8 Dec 2022 15:36:18 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH] gdb/testsuite: update a pattern in gdb_file_cmd Content-Language: en-US To: Simon Marchi , Enze Li , gdb-patches@sourceware.org Cc: enze.li@gmx.com References: <6677a380-2760-64f8-5729-f8b7adce4c84@simark.ca> From: Tom de Vries In-Reply-To: <6677a380-2760-64f8-5729-f8b7adce4c84@simark.ca> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,SPF_HELO_NONE,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 16:01, Simon Marchi via Gdb-patches wrote: > 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 Hi, I ended up needing this patch in trunk for another patch, so I've applied it (after adding the approved-by tag). Thanks again, - Tom