From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 04B2338133E8 for ; Mon, 30 May 2022 09:57:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 04B2338133E8 Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-630--3dNL40qOuCwzcfLGbCeCA-1; Mon, 30 May 2022 05:57:56 -0400 X-MC-Unique: -3dNL40qOuCwzcfLGbCeCA-1 Received: by mail-qt1-f199.google.com with SMTP id l20-20020ac81494000000b002f91203eeacso9798565qtj.10 for ; Mon, 30 May 2022 02:57:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=4knUP2WhbbgGcpMFzJNssQLplGZGaJbaAm2bCIZT9VE=; b=qD8D7W/ifTCsjnSahUZPiagPTL3F10UfR9FCXLhqXKKA54XEhCH8VHC6rhmBbroyE1 vLdfDMnGtEZe5eN7cGiK3p2AwU8yH4SpG2Ccawgm5orETqlqNh/i7h+voiimH0a42Zr2 NEqIkMBMC/Z4mYlgFs49T4yiHoVnpDPkyV0f/FWOVcCjCTBae2OsElsybvcuaSS5UzB/ ouXSfznwPO1RmXOWqu20cD81etnl1pdQ5rJqhe8hGTJgg8478yptdVhhE3Y10eYx+Rfn KHonMjquVwIpiloNrdAPJWiMnbmv5NBfs4+YbHiC6JCRUSHRoUJVQVmKhhSbjgvdG/vm VRIw== X-Gm-Message-State: AOAM530eZqDy/+vrxVMskXWv4AAfC5L7h/ZK01vg9Y6fsRHrDHqEtsKu DuNFssaQWLeMp4nxFv2PkefZoJjQMkciavSofXlBRuQcMh2c/A5XgqvqLw5JD3sK8ITI3lUzDa4 W3zEJ30865cS3Mhsobzwr0/ar8ESGAl7dPki31ABvEv46UmA2BnD4hgD9yZqoJx6gKcJ3Iq2qgg == X-Received: by 2002:ac8:5a81:0:b0:304:b54d:96a2 with SMTP id c1-20020ac85a81000000b00304b54d96a2mr802683qtc.686.1653904675940; Mon, 30 May 2022 02:57:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCgk0gpfqkttL362+qyTYWLiWIWgOVa/5i4MK3Y8ICA/kfmk6wFiEuAXT4uyuSmHbBO4tDCg== X-Received: by 2002:ac8:5a81:0:b0:304:b54d:96a2 with SMTP id c1-20020ac85a81000000b00304b54d96a2mr802671qtc.686.1653904675659; Mon, 30 May 2022 02:57:55 -0700 (PDT) Received: from localhost (host109-152-215-36.range109-152.btcentralplus.com. [109.152.215.36]) by smtp.gmail.com with ESMTPSA id 72-20020a370c4b000000b0069fc13ce1e1sm7686507qkm.18.2022.05.30.02.57.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 02:57:55 -0700 (PDT) From: Andrew Burgess To: Paulo Neves via Gdb-patches , gdb-patches@sourceware.org Cc: Paulo Neves Subject: Re: [PATCH v2 2/3] gdb/python doc: Add enable property to the unwinder example In-Reply-To: <20220528132905.3886575-2-ptsneves@gmail.com> References: <20220528115509.3865342-1-ptsneves@gmail.com> <20220528132905.3886575-1-ptsneves@gmail.com> <20220528132905.3886575-2-ptsneves@gmail.com> Date: Mon, 30 May 2022 10:57:53 +0100 Message-ID: <87sfore40u.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, 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 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: Mon, 30 May 2022 09:58:00 -0000 Paulo Neves via Gdb-patches writes: > The enable property is now also in the example code making it clear how > it is used and how it influences the operation of an unwinder. > --- > gdb/doc/python.texi | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi > index 5b7fba798a9..444e332d752 100644 > --- a/gdb/doc/python.texi > +++ b/gdb/doc/python.texi > @@ -2796,6 +2796,11 @@ class FrameId(object): > class MyUnwinder(Unwinder): > def __init__(....): > super(MyUnwinder, self).__init___() > + # If set to True the unwinder will be enabled. > + # If upon registration the enable property is True, the unwinder > + # will be usable immediately. > + # gdb or code may change value. > + self.enabled = Everything I said about patch #1 applies here too. I think your comment could be shortened to just: # If set to True the unwinder will be enabled and available for use. Given that text I think most users will assume that setting the field to `True` in the constructor will result in the unwinder being available upon registration. Thanks, Andrew > > def __call__(pending_frame): > if not : > -- > 2.25.1