From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id dHnaMWgWP2FqHgAAWB0awg (envelope-from ) for ; Mon, 13 Sep 2021 05:14:16 -0400 Received: by simark.ca (Postfix, from userid 112) id B8A6D1EE25; Mon, 13 Sep 2021 05:14:16 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [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 F3AC01EE18 for ; Mon, 13 Sep 2021 05:14:15 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 780DF3857805 for ; Mon, 13 Sep 2021 09:14:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 780DF3857805 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1631524455; bh=lZ90FNV9/TqIc9z+tYV+dUUTik2wW9piKlZr+bA3aKQ=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=USm9cZSi5pBWJx2NsFdCKkwJyoo+JdnPnx/n0KcjVWiALWdNVG/xWXkyz1Be2C6aJ PjFjFLx4I2neGYcSysc1mjfws4qDfPyEs+sTgHupl9DOheddSni/RNjCl4QmTISkb8 v/5o5EdzBB2aywhBCzHM7v+RkNEQSNm+bzsXjPQg= Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id E77233858402 for ; Mon, 13 Sep 2021 09:13:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E77233858402 Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (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-out2.suse.de (Postfix) with ESMTPS id 050C91FD79 for ; Mon, 13 Sep 2021 09:13:56 +0000 (UTC) Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (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 imap1.suse-dmz.suse.de (Postfix) with ESMTPS id E6CDB132AB for ; Mon, 13 Sep 2021 09:13:55 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap1.suse-dmz.suse.de with ESMTPSA id A7PHNlMWP2GUHQAAGKfGzw (envelope-from ) for ; Mon, 13 Sep 2021 09:13:55 +0000 Date: Mon, 13 Sep 2021 11:13:54 +0200 To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Fix gdb.gdb/selftest.exp Message-ID: <20210913091352.GA24524@delia.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) 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: Tom de Vries via Gdb-patches Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Hi, With a gdb build with CFLAGS "-O2 -g -flto=auto", I run into: ... #7 gdb_main (args=0x7fffffffd220) at src/gdb/main.c:1368^M #8 main (argc=, argv=) at src/gdb/gdb.c:32^M (gdb) FAIL: gdb.gdb/selftest.exp: backtrace through signal handler ... which means that this regexp in proc test_with_self fails: ... -re "#0.*(read|poll).*in main \\(.*\\) at .*gdb\\.c.*$gdb_prompt $" { ... The problem is that gdb_main has been inlined into main, and consequently the backtrace uses: ... #x ... ... instead of ... #x
in ... ... Fix this by updating the regexp to not require "in" before " main". Tested on x86_64-linux. Committed to trunk. Thanks, - Tom [gdb/testsuite] Fix gdb.gdb/selftest.exp --- gdb/testsuite/gdb.gdb/selftest.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp index bee3010bca1..35b06e53e90 100644 --- a/gdb/testsuite/gdb.gdb/selftest.exp +++ b/gdb/testsuite/gdb.gdb/selftest.exp @@ -143,7 +143,7 @@ proc test_with_self { } { setup_xfail "i*86-pc-linuxaout-gnu" set description "backtrace through signal handler" gdb_test_multiple "backtrace" "$description" { - -re "#0.*(read|poll).*in main \\(.*\\) at .*gdb\\.c.*$gdb_prompt $" { + -re "#0.*(read|poll).* main \\(.*\\) at .*gdb\\.c.*$gdb_prompt $" { pass "$description" } }