From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id LhkUDGCLVWGfTwAAWB0awg (envelope-from ) for ; Thu, 30 Sep 2021 06:03:12 -0400 Received: by simark.ca (Postfix, from userid 112) id 287721EE27; Thu, 30 Sep 2021 06:03:12 -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 45EF51EDF7 for ; Thu, 30 Sep 2021 06:03:11 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C14253858036 for ; Thu, 30 Sep 2021 10:03:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C14253858036 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1632996190; bh=r0KY40czpE3kF8A9okmIEw2sW1pJ+Hj50OaPgL8DDao=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=hCx6b2jzdv0tjDZRcoCn9G3YMC7A08NvLc3wB8KsXdm4mdwGTWgz2+sTTGK/z7EX+ VgX+buHyfWSF/ZIDiDMXOsVXsLYhuYgOc3VSDV8fOg+6X5yvNH87ElEgWBXaxZUoAA x5XrJX9LY45orNjcAOi774ouEz2c0zkqjNZDI/PA= Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id B9CF33858C39 for ; Thu, 30 Sep 2021 10:02:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B9CF33858C39 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 ED4D1225B8 for ; Thu, 30 Sep 2021 10:02:51 +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 DB1C9140D0 for ; Thu, 30 Sep 2021 10:02:51 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id hfttNEuLVWEVZwAAMHmgww (envelope-from ) for ; Thu, 30 Sep 2021 10:02:51 +0000 Date: Thu, 30 Sep 2021 12:02:50 +0200 To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Fix full buffer in gdb.rust/dwindex.exp Message-ID: <20210930100248.GA13509@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, On ubuntu 18.04.5, I run into: ... (gdb) mt print objfiles dwindex^M ^M Object file build/gdb/testsuite/outputs/gdb.rust/dwindex/dwindex: \ Objfile at 0x55dab0b87a50, bfd at 0x55dab0b0cfa0, 1095 minsyms^M ^M Psymtabs:^M vendor/compiler_builtins/src/int/specialized_div_rem/mod.rs at 0x55dab0db0720^M ... library/std/src/sys/unix/stdio.rs at 0x55dab0d96320^M ERROR: internal buffer is full. UNRESOLVED: gdb.rust/dwindex.exp: check if index present ... Fix this by using -lbl in proc ensure_gdb_index. Tested on x86_64-linux. Committed to trunk. Thanks, - Tom [gdb/testsuite] Fix full buffer in gdb.rust/dwindex.exp --- gdb/testsuite/lib/gdb.exp | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index b7f3a57c4d9..afdc92eec3f 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -7917,22 +7917,36 @@ proc add_gdb_index { program {style ""} } { # string (the default) means .gdb_index; "-dwarf-5" means .debug_names. proc ensure_gdb_index { binfile {style ""} } { + global decimal + set testfile [file tail $binfile] set test "check if index present" - gdb_test_multiple "mt print objfiles ${testfile}" $test { - -re -wrap "gdb_index.*" { - return 0 + set has_index 0 + gdb_test_multiple "mt print objfiles ${testfile}" $test -lbl { + -re "\r\n\\.gdb_index: version ${decimal}(?=\r\n)" { + set has_index 1 + gdb_test_lines "" $gdb_test_name ".*" } - -re -wrap "debug_names.*" { - return 0 + -re "\r\n\\.debug_names: exists(?=\r\n)" { + set has_index 1 + gdb_test_lines "" $gdb_test_name ".*" } - -re -wrap "Psymtabs.*" { - if { [add_gdb_index $binfile $style] != "1" } { - return -1 - } - return 1 + -re "\r\nPsymtabs:(?=\r\n)" { + gdb_test_lines "" $gdb_test_name ".*" } + -re -wrap "" { + fail $gdb_test_name + } + } + + if { $has_index } { + return 0 } + + if { [add_gdb_index $binfile $style] == "1" } { + return 1 + } + return -1 }