From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by sourceware.org (Postfix) with ESMTPS id 5176F385023B for ; Fri, 3 Jun 2022 15:54:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5176F385023B Received: by mail-lf1-x136.google.com with SMTP id h23so13278777lfe.4 for ; Fri, 03 Jun 2022 08:54:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=AMmzyZDzy5h9/cbJIc6guLLl6aKHeYl/YVXQZ2qwqU0=; b=3G3VnlcIH+OqdlzvZhXGPRj1YgYUSQByqMyET8WVMmxeuX4i1lcknb587ben1Fi6Kq KjEt3NGiAYeaJoFEyTaRjuP8BfEgcJyiLGlqCcO6byjWnyvjZmWAxoQMNMBIlqWEPxn8 IJfMQZlYeKg/6uCyn+x8HdtFmcyUK9ZBl5rNKA+d9rN6RRpMpeVKxI+dvYzJWg+QyXv3 dv5K0RSHGvSYHUfo1KgilLcGfhrZ4Zc8Y7dZh1bjpYqYQNErE92fthVcac3RSJvXK5wG Tq2/VnSqJBXooy31HQeySjF7Zz4avLB8ECyTug6vUfn5AqGo6SV/CRvY2pdfdzgfjyvu AM2w== X-Gm-Message-State: AOAM533xDMiDF+5BTwkyIZot8dDQE4VFem/390qxfgZsWjl3rW8j6wV4 KaJMTIucIbRT3maA3funBJIy8L4hsQ== X-Google-Smtp-Source: ABdhPJwvm5vZ/3B1MAYZzGUwZROR9WOgMuaTkWCIRLeQ/0R3O45Va4n6aIMjrSobBgM9+zmOctM99Q== X-Received: by 2002:a19:5e48:0:b0:479:f9:6dfe with SMTP id z8-20020a195e48000000b0047900f96dfemr10097162lfi.379.1654271678741; Fri, 03 Jun 2022 08:54:38 -0700 (PDT) Received: from [10.67.202.36] (85-128-83-172.static.ip.netia.com.pl. [85.128.83.172]) by smtp.gmail.com with ESMTPSA id i1-20020ac25221000000b004725b99d2fdsm1635066lfl.164.2022.06.03.08.54.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 03 Jun 2022 08:54:37 -0700 (PDT) Message-ID: Date: Fri, 3 Jun 2022 17:54:36 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH v2 2/3] gdb/python doc: Add enable property to the unwinder example Content-Language: en-US To: Andrew Burgess , Paulo Neves via Gdb-patches References: <20220528115509.3865342-1-ptsneves@gmail.com> <20220528132905.3886575-1-ptsneves@gmail.com> <20220528132905.3886575-2-ptsneves@gmail.com> <87sfore40u.fsf@redhat.com> From: Paulo Neves In-Reply-To: <87sfore40u.fsf@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, 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 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: Fri, 03 Jun 2022 15:54:42 -0000 On 5/30/22 11:57, Andrew Burgess wrote: > 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. I think that part can be indeed removed but I think the hint that gdb may change values of your unwinder is important. I wrote these changes though the eyes of the difficulties I had as an absolute GDB extension newbie. > Thanks, > Andrew > > >> >> def __call__(pending_frame): >> if not : >> -- >> 2.25.1