From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id xtOOLj5wVGEFMAAAWB0awg (envelope-from ) for ; Wed, 29 Sep 2021 09:55:10 -0400 Received: by simark.ca (Postfix, from userid 112) id AC9131EE27; Wed, 29 Sep 2021 09:55:10 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.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 635C11EE24 for ; Wed, 29 Sep 2021 09:55:09 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AC2353857C4C for ; Wed, 29 Sep 2021 13:55:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AC2353857C4C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1632923708; bh=cTzBw7UjZwhAPoCmbQLpBqZqwl61biFSMaN7WfxTuxE=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=rr8CeIG7UJ+JD9BHVNmeG0KL8JDVxUyMPZrXJy2HtB9LUPadknYlt7nhk188h1yhP YgFe4Ajw8mGJqbvv4rM9GnXouIEs9iZfKdNmoqTP2glBh/0D2ftJLqs0+UjpkfN+Ov mdO/8Wa/9hX2q8IcasThyE4M6hPtxq9fuRZwU6Yc= Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 8D0DC3858406 for ; Wed, 29 Sep 2021 13:54:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8D0DC3858406 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-out2.suse.de (Postfix) with ESMTPS id 7F7F61FDE2 for ; Wed, 29 Sep 2021 13:54:49 +0000 (UTC) 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 6DDD814027 for ; Wed, 29 Sep 2021 13:54:49 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id yRLTGSlwVGGfYAAAMHmgww (envelope-from ) for ; Wed, 29 Sep 2021 13:54:49 +0000 Date: Wed, 29 Sep 2021 15:54:47 +0200 To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Fix breakpoint detection in gdb.gdb/python-helper.exp Message-ID: <20210929135446.GA16033@delia> 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 configured to be somewhat minimal, while still supporting python: ... $ gdb --configuration This GDB was configured as follows: configure --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu --with-auto-load-dir=$debugdir:$datadir/auto-load --with-auto-load-safe-path=$debugdir:$datadir/auto-load --without-expat --with-gdb-datadir=$install/share/gdb (relocatable) --with-jit-reader-dir=$install/lib64/gdb (relocatable) --without-libunwind-ia64 --without-lzma --without-babeltrace --without-intel-pt --with-mpfr --without-xxhash --with-python=/usr --with-python-libdir=/usr/lib --with-debuginfod --without-guile --disable-source-highlight --with-separate-debug-dir=/usr/lib/debug --with-system-gdbinit=$devel/system-gdbinit ... and using gcc 4.8 to build gdb (causing std::thread not to be used due to PR28318) I ran into: ... (gdb) PASS: gdb.gdb/python-helper.exp: start inner gdb print 1^M ^M Breakpoint 2, value_print () at src/gdb/valprint.c:1174^M 1174 scoped_value_mark free_values;^M (xgdb) FAIL: gdb.gdb/python-helper.exp: hit breakpoint in inner gdb (timeout) ... The problem is that the regexp expects "hit Breakpoint $decimal". The "hit" part is missing. The "hit" is printed by maybe_print_thread_hit_breakpoint, when show_thread_that_caused_stop returns true: ... int show_thread_that_caused_stop (void) { return highest_thread_num > 1; } ... Apparently, that's not the case. Fix this by removing "hit" from the regexp, making the regexp more similar to what is used in say, continue_to_breakpoint. Tested on x86_64-linux. Committed to trunk. Thanks, - Tom [gdb/testsuite] Fix breakpoint detection in gdb.gdb/python-helper.exp --- gdb/testsuite/gdb.gdb/python-helper.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.gdb/python-helper.exp b/gdb/testsuite/gdb.gdb/python-helper.exp index 54c256eb2e0..7013a3a836f 100644 --- a/gdb/testsuite/gdb.gdb/python-helper.exp +++ b/gdb/testsuite/gdb.gdb/python-helper.exp @@ -92,7 +92,7 @@ proc test_python_helper {} { # just created. send_inferior "print 1\n" gdb_test_multiple "" "hit breakpoint in inner gdb" { - -re "hit Breakpoint $decimal, value_print.*\\(xgdb\\) $" { + -re "Breakpoint $decimal, value_print.*\\(xgdb\\) $" { pass $gdb_test_name } }