From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 699F63858C50 for ; Mon, 27 Mar 2023 11:59:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 699F63858C50 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-out2.suse.de (Postfix) with ESMTPS id A0CDF1FDBF for ; Mon, 27 Mar 2023 11:58:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1679918339; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=O3mqs/CJu1spuhKM6cV5EoqJXqYDfrhNxAg6u5/JGpg=; b=MGJN7Gg03eJpDEmMhgKskowU5XtPHjkVzaPxEVr7OwBfePsn73OmrCeEd4+z+k6TLn0SGC oz3KSr71ExkoCgz1xEYfZ+EBzm4MhS2W7/hzCRTIMfWy0hDVQID+vQRrHH9QcIaJHFlZmA kX0kWQBiON8J8WGzoX2KkcISMnL6ztU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1679918339; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=O3mqs/CJu1spuhKM6cV5EoqJXqYDfrhNxAg6u5/JGpg=; b=9Ae+tchFnMCA4lDhzrn7YA5YkE8SMA0veTIZhVlDG+hJjd3UjvrwZmJ5cDiKu07Jeg+PSS 8wXkH0N0Tjzl5KDQ== 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 8C17513482 for ; Mon, 27 Mar 2023 11:58:59 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id QGcoIQOFIWTCOgAAMHmgww (envelope-from ) for ; Mon, 27 Mar 2023 11:58:59 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [pushed 02/10] [gdb/testsuite] Fix have_index for remote host Date: Mon, 27 Mar 2023 13:58:50 +0200 Message-Id: <20230327115858.5950-3-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230327115858.5950-1-tdevries@suse.de> References: <20230327115858.5950-1-tdevries@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,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: Proc have_index is mostly used with $binfile, which gives problems for remote host. Fix this by using "file tail" on the proc argument. Tested on x86_64-linux. --- gdb/testsuite/lib/gdb.exp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 813b755215e..c0762cbb3a8 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -8740,6 +8740,10 @@ proc readnow { } { # Otherwise, return "". proc have_index { objfile } { + # This proc is mostly used with $binfile, but that gives problems with + # remote host, while using $testfile would work. + # Fix this by reducing $binfile to $testfile. + set objfile [file tail $objfile] set res "" set cmd "maint print objfiles $objfile" -- 2.35.3