From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by sourceware.org (Postfix) with ESMTPS id E45093851C07 for ; Wed, 30 Mar 2022 11:52:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E45093851C07 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com Received: by mail-wm1-x334.google.com with SMTP id bi13-20020a05600c3d8d00b0038c2c33d8f3so1051102wmb.4 for ; Wed, 30 Mar 2022 04:52:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=wbghUN38urNNKfkHO/jA5XclsUngym4e+c2wGyuYfWQ=; b=hbMF6r+E9p1buz46kTDgM47ZRT8p8S5TCqOTeREgJWRRQ+XhTja52EgrKhCDi1h/PP BZmEuNuBn/opofhb1HTi87f5/orcNZ8mU57vPsd8+cIoefeU68iXkDvCucmRi88TAqXN sS5FpKYOIjeytnaDZT1jK1pmnWmsr6ZK7FCir6JtrV5Mrst1YF9ihO/UvbZi1KeRksRu mY6KeS2BBDMFhPPnMSFk5nG5etCJx0RT2YzbXOXrsBCf+To1NmaFvDx26oSKNaN1x8Gi r6UrGae8RuRiE4YDu4ySWDnFVjGSvm/R+vlrDhfyFGzaymnQYrHbTkLP6fOPC2tsiIbe Umqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=wbghUN38urNNKfkHO/jA5XclsUngym4e+c2wGyuYfWQ=; b=gj/jAwGSepGR45NIWu6QRqL+o3qGbY0232HoZXP2Jnf0fsaXVUoDmenK2pXJdeHMUP wkW8F57u3KeqXPIYTCTSHtMpUvOo94yMN939dz1nFPVpWpDMs0P6xg1bbmFDZcwGdMpr 9t3LzAK0bCfntzOc3pP74x6UEaitUNMly5OtNyo8vKZnbkNOl6RENHRXVbPPYch3cnp3 5l495smbsmPIRoyxRdZP/vkF2o6xZFVVfhS/xrpurx5CuuCd7xKCQV9HecFbyDdm/YYu ODOT+WriNTuFPlaEkOqdw/UqL9FSmjATTs8FgPczhbAUX9goRld2fVqsLUKjL7PVMuPj +toA== X-Gm-Message-State: AOAM532AwXDsglOzV3mz4hY+xmVKrEM869cO8jsGAzDWtRydXBTDLzcS Uvp04bO5Da8Jb2CcOO/SpcYB3TyHFzVgGQ== X-Google-Smtp-Source: ABdhPJxM9hOMut7zT4/MpKKFHef+xAdfUZr05u4/qrN7Tu9xKrOwPxFJRZJAdfbC8X4lcwj01q3PCw== X-Received: by 2002:a05:600c:3512:b0:38c:be56:fc9c with SMTP id h18-20020a05600c351200b0038cbe56fc9cmr4034001wmq.197.1648641130604; Wed, 30 Mar 2022 04:52:10 -0700 (PDT) Received: from [192.168.0.201] ([212.69.42.53]) by smtp.gmail.com with ESMTPSA id c5-20020a5d63c5000000b002040822b680sm24879339wrw.81.2022.03.30.04.52.10 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Mar 2022 04:52:10 -0700 (PDT) Date: Wed, 30 Mar 2022 12:52:09 +0100 (BST) From: "Maciej W. Rozycki" To: Simon Sobisch cc: gdb-patches@sourceware.org, Andrew Burgess , Simon Marchi , Tom Tromey Subject: Re: [PATCH v5 2/8] GDB/Python: Use None for `var_zuinteger_unlimited' value set to `unlimited' In-Reply-To: <64cadd4a-fff4-5988-3f2b-1bee9d3ee0e4@web.de> Message-ID: References: <05e800f2-c119-1675-7465-f3ea3168cb58@web.de> <64cadd4a-fff4-5988-3f2b-1bee9d3ee0e4@web.de> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org 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: , X-List-Received-Date: Wed, 30 Mar 2022 11:52:13 -0000 On Wed, 30 Mar 2022, Simon Sobisch wrote: > When you get a parameter before and it is an integer you can do integer > comparisons on it. After the changes it is None and you can't do integer > comparisons on it (raises an exception). > > So if the bug was introduced to have -1 and it is likely that people > coded against that: please give them a clue with a note like > > Python scripting: GDB x introduced a bug where `gdb.Parameter()` returns > '-1' for some Parameters when meaning "unlimited", which is now restored > to the previous behavior of returning 'None'. > > > This will allow people to watch out for this and adjust their scripts to > check for -1, then set to None (if they care for the buggy versions) and > compare to "None" in all places. If maintainers agree, then I will add such a NEWS entry, however I'd rather avoid respinning the series just for such a small update (and another mere docs change), so I'll wait for feedback on the code changes proper first. Maciej