From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id LQvvLvVdyGjdswUAWB0awg (envelope-from ) for ; Mon, 15 Sep 2025 14:41:57 -0400 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=eFXPaWHj; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id B0DE41E0BA; Mon, 15 Sep 2025 14:41:57 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from server2.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 ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 22DB01E04C for ; Mon, 15 Sep 2025 14:41:57 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C73293858C24 for ; Mon, 15 Sep 2025 18:41:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C73293858C24 Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=eFXPaWHj Received: from omta038.useast.a.cloudfilter.net (omta038.useast.a.cloudfilter.net [44.202.169.37]) by sourceware.org (Postfix) with ESMTPS id 769543857B8F for ; Mon, 15 Sep 2025 18:39:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 769543857B8F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 769543857B8F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.37 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1757961591; cv=none; b=QPP49dv7E9mBj8VWfYRBv4BXuhtvoPUJAPPgNy3E8w1hDk8aXluYhbAo4Cf0+Wge7MRyFHDc0SO5TcYvu9od3/uK1VhKzk5ND9OFodEEK8QCMemoOuHgbnB/niHaYkokcHXNvl4+rd/tEb3LK43kN6sskY0wkpb/bKseMLzCtU8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1757961591; c=relaxed/simple; bh=uS2JFMVs6BVbNXmYuTJIMbcdZYZBxCUrqoxLj4OJUus=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=JrqmxZfRj4f04o6J3GZOUR0iQ4NVSKXktZPNkOuLGARG4BPlDC58PRaBBTQjpTvyAlStgFO+MwdtNm0QDoGYNCdH4cuxNQAebaDT8m6VvvWenNgtoyxKGWOt4OHeUId0epuFDjr/HKBwTPqKPncrGTWHNGIlNi+Ibb/EU5KkSpY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 769543857B8F Received: from eig-obgw-6001b.ext.cloudfilter.net ([10.0.30.143]) by cmsmtp with ESMTPS id y8X9uTo6OSkcfyE7Dup31F; Mon, 15 Sep 2025 18:39:51 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id yE7CuPQfBip2CyE7CuGfJZ; Mon, 15 Sep 2025 18:39:50 +0000 X-Authority-Analysis: v=2.4 cv=HsR2G1TS c=1 sm=1 tr=0 ts=68c85d76 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=yJojWOMRYYMA:10 a=ItBw4LHWJt0A:10 a=8_frmusdKeTUmsqK7nUA:9 a=VS4QxaUSPT0UtbFnIvSC:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=9BqwEyuGLOA3SrCxuwmAKnydaF2OwdEZdDcenMSCSfk=; b=eFXPaWHjVXFIEM/8YzpQDufa3R Y/wG8JonbF3b9/CkSOGvFH8quIoD8ACeSOiDijKHAD2sBZvmgkvkq+go4+xVFrU5hGH/+wH+3dGBM HtcAD8Jj5uP5v9WSsiw6gTckB; Received: from 97-122-110-68.hlrn.qwest.net ([97.122.110.68]:60360 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.1) (envelope-from ) id 1uyE7C-000000021Zx-0v1l; Mon, 15 Sep 2025 12:39:50 -0600 From: Tom Tromey To: Kevin Buettner Cc: gdb-patches@sourceware.org, Tom Tromey Subject: Re: [PATCH] Remove uses of "eval" from gdb testsuite In-Reply-To: <20250915111518.0cefd70b@f41-zbm-amd> (Kevin Buettner's message of "Mon, 15 Sep 2025 11:15:18 -0700") References: <20250913194016.930447-1-tom@tromey.com> <20250915111518.0cefd70b@f41-zbm-amd> X-Attribution: Tom Date: Mon, 15 Sep 2025 12:39:49 -0600 Message-ID: <87frcnmufe.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.110.68 X-Source-L: No X-Exim-ID: 1uyE7C-000000021Zx-0v1l X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-110-68.hlrn.qwest.net (bapiya) [97.122.110.68]:60360 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfGGX7IKmM+R1AglRsDrd+DyjFp7Wm2t4lB+CcKIQKaaV7TzJxlMsBcXDeUPGLVtvkihbW71ZSco6Z5Zo+wX6OEaoioAA2dIad9tt4rv6jIpIPhoKUDw/ mBgiDBe+wfESCMBgnj8UMowdG58oeWwsGDkCbORPj1oECWU7HJFm8W/M5QgQCoSuZAvIH+eaoW+5rl7Hx58EiO/enKCfK4hWZ9E= X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 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 >> proc dap_match_values {name d args} { >> foreach {key value} $args { >> - if {[eval dict get [list $d] $key] != $value} { >> + if {[dict get $d {*}$key] != $value} { Kevin> Is the {*} expansion needed here? I've looked at the callers of Kevin> dap_match_values and the key is always a plain string, so the splatted Kevin> version is equivalent to 'dict get $d $key'. The splat would only Kevin> matter if 'key' could be a list for a nested dictionary lookup. Yeah, many invocations use this feature, e.g.: dap_match_values "argc in function" [lindex $obj 0] \ "body result" 3 Here 'args' ends up as the list {"body result" 3} and then the first call to "dict get" is passed "body result" as the key -- but this is trying to fetch a sub-key. Tom