From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id ONevE+oq42BLYwAAWB0awg (envelope-from ) for ; Mon, 05 Jul 2021 11:53:14 -0400 Received: by simark.ca (Postfix, from userid 112) id 4E0481F1F2; Mon, 5 Jul 2021 11:53:14 -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.9 required=5.0 tests=DKIM_SIGNED, MAILING_LIST_MULTI,T_DKIM_INVALID,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 915A31E940 for ; Mon, 5 Jul 2021 11:53:13 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5E4BC3864830 for ; Mon, 5 Jul 2021 15:53:13 +0000 (GMT) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 0D2F6385BF84 for ; Mon, 5 Jul 2021 15:52:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0D2F6385BF84 Authentication-Results: sourceware.org; dmarc=none (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 3AD4D226A7; Mon, 5 Jul 2021 15:52:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1625500368; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=pWR0p961rSfjpe05/Y6qWOc23vH3O4DRan9WGH2+Y60=; b=vyCTeEDVhW1JVdQ+FPBb2xCK1eCIZ5nzrNodmZ3CwxER8Qgzc3/bCYO3xo8/1qDSu0zXTH dM5+hZj45BvV4bSG+iJXPLynDpDAnBd9DZETqSvn74YAXVCot+pARGLgP8hdyDKQlQ+Ve7 dGYI09dkfcSn3fj+8WZTfeqa3Oz2xiY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1625500368; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=pWR0p961rSfjpe05/Y6qWOc23vH3O4DRan9WGH2+Y60=; b=zpwAWOEvLsYHRlc+vVn3U5WgKp2cP1gUKdJXXAhvzT+3ndNmBSneL+0C3xP0EbINxaSpY1 FwXn4OR3LOp/HjCw== 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 180C013A66; Mon, 5 Jul 2021 15:52:48 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id bEb+A9Aq42A7KwAAMHmgww (envelope-from ); Mon, 05 Jul 2021 15:52:48 +0000 Date: Mon, 5 Jul 2021 17:52:46 +0200 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH][gdb/testsuite] Fix gdb.mi/mi-info-sources.exp for extra debug info Message-ID: <20210705155244.GA18313@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: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Hi, When running test-case gdb.mi/mi-info-sources.exp, I run into: ... Running src/gdb/testsuite/gdb.mi/mi-info-sources.exp ... ERROR: internal buffer is full. ... due to extra debug info from the shared libraries. Fix this by using "nosharedlibrary". Then I run into these FAILs: ... FAIL: gdb.mi/mi-info-sources.exp: debug_read=false: \ -file-list-exec-source-files (unexpected output) FAIL: gdb.mi/mi-info-sources.exp: debug_read=true: \ -file-list-exec-source-files (unexpected output) FAIL: gdb.mi/mi-info-sources.exp: debug_read=true: \ -file-list-exec-source-files --group-by-objfile, look for \ mi-info-sources.c (unexpected output) FAIL: gdb.mi/mi-info-sources.exp: debug_read=true: \ -file-list-exec-source-files --group-by-objfile, look for \ mi-info-sources-base.c (unexpected output) ... due to openSUSE executables which have debug info for objects from sources like sysdeps/x86_64/crtn.S. Fix these by updating the patterns. Tested on x86_64-linux. Any comments? Thanks, - Tom [gdb/testsuite] Fix gdb.mi/mi-info-sources.exp for extra debug info gdb/testsuite/ChangeLog: 2021-07-05 Tom de Vries * gdb.mi/mi-info-sources.exp: Use nosharedlibrary. Update patterns. --- gdb/testsuite/gdb.mi/mi-info-sources.exp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/gdb/testsuite/gdb.mi/mi-info-sources.exp b/gdb/testsuite/gdb.mi/mi-info-sources.exp index c4d6b910ef8..6d69de0e29f 100644 --- a/gdb/testsuite/gdb.mi/mi-info-sources.exp +++ b/gdb/testsuite/gdb.mi/mi-info-sources.exp @@ -30,6 +30,10 @@ mi_clean_restart $binfile mi_runto_main +# Unload symbols for shared libraries to prevent +# 'ERROR: internal buffer is full'. +mi_gdb_test "nosharedlibrary" ".*\\^done" "nosharedlibrary" + # Helper to build expected MI output pattern for a list. NAME is the # name of the list (which can be the empty string) and args is one # or more strings representing the fields of the list, which will be @@ -113,20 +117,24 @@ proc check_info_sources { debug_fully_read } { [mi_field "file" "\[^\"\]+/mi-info-sources-base\\.c"] \ [mi_field "fullname" "\[^\"\]+/mi-info-sources-base\\.c"] \ [mi_field "debug-fully-read" "${debug_fully_read}"]] \ + ".*" \ [mi_tuple "" \ [mi_field "file" "\[^\"\]+/mi-info-sources\\.c"] \ [mi_field "fullname" "\[^\"\]+/mi-info-sources\\.c"] \ - [mi_field "debug-fully-read" "true"]]] + [mi_field "debug-fully-read" "true"]] \ + ".*"] } else { set p [mi_list "files" \ [mi_tuple "" \ [mi_field "file" "\[^\"\]+/mi-info-sources\\.c"] \ [mi_field "fullname" "\[^\"\]+/mi-info-sources\\.c"] \ [mi_field "debug-fully-read" "true"]] \ + ".*" \ [mi_tuple "" \ [mi_field "file" "\[^\"\]+/mi-info-sources-base\\.c"] \ [mi_field "fullname" "\[^\"\]+/mi-info-sources-base\\.c"] \ - [mi_field "debug-fully-read" "${debug_fully_read}"]]] + [mi_field "debug-fully-read" "${debug_fully_read}"]] \ + ".*"] } mi_gdb_test "-file-list-exec-source-files" ".*\\^done,${p}" "-file-list-exec-source-files" @@ -140,7 +148,7 @@ proc check_info_sources { debug_fully_read } { # Figure out the value for the 'debug-info' field. if {${debug_fully_read} == "true"} { - set debug_info "fully-read" + set debug_info "(fully-read|partially-read)" } else { set debug_info "partially-read" }