From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by sourceware.org (Postfix) with ESMTPS id AE7203858D28 for ; Tue, 20 Jun 2023 18:41:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AE7203858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-4f86bc35f13so4304237e87.1 for ; Tue, 20 Jun 2023 11:41:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687286470; x=1689878470; h=content-transfer-encoding:in-reply-to:cc:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=RJoySEGdOlr909fAaTzVY95wwzVlyKgGZLsGt22cAMQ=; b=Dr6F5WvYkW7yKREUVseSQEkkOp9B9jFIB6u9m7rL5+3CKCREH0xUDGjoo5YvvWLEDV u6Zi64TmSshopueCch6zcNWiqqLmMSrVis1NQVE+7h3/Jul4UF7tIOD3jv5hCUIYwZtd 6p9oTUwGcMzbgF6hSPjxA1cnL4q/LNq82xu5v+uXEcWCiIgkm12kutI4I3n6WppmQrul W2kDIje0sll7/74uEjLZiJXc6/Kw7y5fHKxgUG5Qg2kgTG7nY49jmxwdKR8Xw4UIxIg1 JY1UMTggK1HTHLWtiEDQ7+vWFY6sWSSIGG4bQuDrYx3lAFvFRbxf4Xe7alYNu/ewCVqD hoUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687286470; x=1689878470; h=content-transfer-encoding:in-reply-to:cc:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=RJoySEGdOlr909fAaTzVY95wwzVlyKgGZLsGt22cAMQ=; b=BO0lC5vIK8s9mjPgatQoiJg6kw0eMjuZNMZ6KB59G2DYtw2qjIiQLquSaQ75V5PCjo mvXD63AGcKpqMs1gEhJx4/4FGEuxNu3kimniF3UAhKRYm2mGLQl9CHWTtP71jh3867m4 slT1GD5KVsYWRueMHuOL5GS/Vh+rsL9AT5/KuD0l2gfMfel0imYk4uUjB93Z9sFDQtPs 0tdTP6voBRDkQTbhsPXfFWiA9WX2lcXfiL7kyCTu45kqpe2Wm+EHQDaSj2mz6geoPmCZ Y/uaj3X6Ea1V4Q+uhGDp8HuT9xtJmMiavd471cMXGYJEQ4JvSIZTZ6h5mnp5IdCl0KMx k6yA== X-Gm-Message-State: AC+VfDwBJETxPxJXE8qYtCod2Agk0CY/8Y1YqyX5/fKrRD/56OUf8z4p UCsm17DlbZnd56rf2OFmdlztky7/DXk= X-Google-Smtp-Source: ACHHUZ7Aqrba//BzoZAvXNO0T70H3puMJdmPyLj2VaWj1ZAuMZAM2GI8E+y5kb2pInVfKRuSQ67Y6A== X-Received: by 2002:a19:6418:0:b0:4f9:571d:c50e with SMTP id y24-20020a196418000000b004f9571dc50emr259739lfb.36.1687286469730; Tue, 20 Jun 2023 11:41:09 -0700 (PDT) Received: from [192.168.1.20] (78-73-77-63-no2450.tbcn.telia.com. [78.73.77.63]) by smtp.gmail.com with ESMTPSA id w5-20020a05651204c500b004f5e681eec1sm459611lfq.92.2023.06.20.11.41.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Jun 2023 11:41:08 -0700 (PDT) Message-ID: <32a6bb3b-3542-2a49-5059-43749506b012@gmail.com> Date: Tue, 20 Jun 2023 20:41:07 +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: [PATCH] gdb/DAP Few bug fixes & Evaluate Array Watch vars To: Tom Tromey References: <20230620081549.202591-1-simon.farre.cx@gmail.com> <87fs6m2npn.fsf@tromey.com> Content-Language: en-US From: Simon Farre Cc: gdb-patches@sourceware.org In-Reply-To: <87fs6m2npn.fsf@tromey.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,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: No, not necessarily, if we for instance is retrieving children of an array, or the expression el[3]@7; then each "name" of the children will be, 1,2,3 ..., i.e. numbers. This will make displaying any of them in VSCode not work. On 6/20/23 16:49, Tom Tromey wrote: >>>>>> "Simon" == Simon Farre via Gdb-patches writes: > Simon> First of all, name of VariableReferences must always be of string type. > > Do you mean if it is not None? > > If so then the EvaluateResult change isn't needed. > But if None shouldn't be accepted, then BaseReference.to_object could be > changed. > > Did this cause a problem somewhere? > > Simon> The result[self.result_name] also f-strings the printer.to_string() > Simon> value, because this can potentially be a LazyString (which is a Python > Simon> object, not a string) and is not serializable by json.dumps. > > We've been avoiding f-strings because some LTS distros are stuck on > versions of Python without them. I think using str() is fine though. > > Tom