From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id WImHHh3zKGFPWQAAWB0awg (envelope-from ) for ; Fri, 27 Aug 2021 10:13:49 -0400 Received: by simark.ca (Postfix, from userid 112) id 7B2571EE1B; Fri, 27 Aug 2021 10:13:49 -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=unavailable 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 3341C1EDEE for ; Fri, 27 Aug 2021 10:13:49 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A3352385AC2C for ; Fri, 27 Aug 2021 14:13:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A3352385AC2C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1630073628; bh=mKDSydoaszTjHG5yk5DfWXcI9wCcV9NqyjmYre6zjDA=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=JJjKW76U4Dxpi/2G+Cog0+dFarj0nB/iRoXOE3+Cz3fCwYe8r7VJtzLrLy0zm68So gSVbCCtAKDkhS5HfvMw5DUdeYbtFtOOQxTdkXco9OTFbk1+ff8XUj/KqX1C814hA1e wELgdpsibwL1hCl/A7FPqLqQhj7wAD0n1OeAGIho= Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id DAF193857C60 for ; Fri, 27 Aug 2021 14:13:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DAF193857C60 Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (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 C742A22375; Fri, 27 Aug 2021 14:13:03 +0000 (UTC) Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (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 imap1.suse-dmz.suse.de (Postfix) with ESMTPS id A3799138A0; Fri, 27 Aug 2021 14:13:03 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap1.suse-dmz.suse.de with ESMTPSA id 9dw/Ju/yKGGibQAAGKfGzw (envelope-from ); Fri, 27 Aug 2021 14:13:03 +0000 Subject: Re: [PATCH][gdb/testsuite] Add label option to proc cu To: Tom Tromey , Tom de Vries via Gdb-patches References: <20210826115605.GA22680@delia> <62258296-6132-ff23-cd4c-2f2820249a60@polymtl.ca> <4b72733b-4725-9d44-a5e5-0325d51064b6@suse.de> <87ilzrowaz.fsf@tromey.com> Message-ID: Date: Fri, 27 Aug 2021 16:13:03 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <87ilzrowaz.fsf@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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" On 8/27/21 3:24 PM, Tom Tromey wrote: >>>>>> "Tom" == Tom de Vries via Gdb-patches writes: > > Tom> + upvar $label my_label > Tom> + set my_label $_cu_label > > Maybe this should be conditional on $label != "" It should indeed. I tried to understand why I didn't run into an error with this, and: ... $ cat test.tcl #!/usr/bin/tclsh proc foo { } { set label "" upvar $label my_label set my_label "bla" } foo puts ${} $ ./test.tcl bla ... apparently it's possible to create a variable with the empty string as variable name. Thanks, - Tom