From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id A95783858D1E for ; Mon, 24 Apr 2023 20:22:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A95783858D1E 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 0DD721F88F; Mon, 24 Apr 2023 20:22:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1682367763; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8I1BvYHFowHWGG3B0U6/2DawhRBwfh+t46ZvY18BP5s=; b=a3suA+74Q73jMdcKoiXuKrXR1vWGOFi4OxkAsaxfflvKL9Jm+ETjEUKMsUQUNlCo9AWO1q jZQVqLo9xf0WXq2GGMJPnDs04/NGNdpb5aBR3VTfJrhNsNNGatHhCDxrudjoyaWFv8xZl1 ur7PasaRd9LDtWjchE+/U5hYIdzzwzQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1682367763; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8I1BvYHFowHWGG3B0U6/2DawhRBwfh+t46ZvY18BP5s=; b=oUS80nTPXJHK1VDf6TC80UftNWe6x9y3EbKsx6xPEdlN/ziWT6ZQ4WHocnO/mOse04ZocN QuP3cLTGd7X+8tDg== 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 EAF3413780; Mon, 24 Apr 2023 20:22:42 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id FzLtNxLlRmRGCQAAMHmgww (envelope-from ); Mon, 24 Apr 2023 20:22:42 +0000 Message-ID: <2a3587b4-98c4-263a-7deb-9530fbf06c57@suse.de> Date: Mon, 24 Apr 2023 22:22:44 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [pushed 1/4] [gdb/testsuite] Don't use string cat in gdb.dwarf2/dw2-abs-hi-pc.exp Content-Language: en-US To: Tom Tromey , Tom de Vries via Gdb-patches References: <20230424124846.29580-1-tdevries@suse.de> <874jp5z0n8.fsf@tromey.com> From: Tom de Vries In-Reply-To: <874jp5z0n8.fsf@tromey.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: On 4/24/23 18:48, Tom Tromey wrote: >>>>>> "Tom" == Tom de Vries via Gdb-patches writes: > > Tom> Fix this by using "expr" instead: > Tom> ... > Tom> set sources [lmap i $sources { expr { "$srcdir/$subdir/$i" } }] > > expr seems very weird here, since it's normally used for evaluating an > expression. I got the idea from here ( https://stackoverflow.com/questions/30489106/using-lmap-to-filter-list-of-strings ). > Maybe subst would be a more idiomatic choice, if it works. It does, indeed: ... -set sources [lmap i $sources { expr { "$srcdir/$subdir/$i" } }] +set sources [lmap i $sources { subst $srcdir/$subdir/$i }] ... My working set of tcl is a bit random, so I don't know what idiomatic is and what not. I agree that subst is neater since it needs less quoting. Thanks, - Tom