From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id sLefGdYummJiIAoAWB0awg (envelope-from ) for ; Fri, 03 Jun 2022 11:55:02 -0400 Received: by simark.ca (Postfix, from userid 112) id 5AA061E221; Fri, 3 Jun 2022 11:55:02 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=u4XlYGBS; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from 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 RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id DCC711E143 for ; Fri, 3 Jun 2022 11:55:01 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3ED7A3841442 for ; Fri, 3 Jun 2022 15:55:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3ED7A3841442 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1654271701; bh=AMmzyZDzy5h9/cbJIc6guLLl6aKHeYl/YVXQZ2qwqU0=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=u4XlYGBSK49/5vM75tnitKQs20+vafY6VHb/Zjtmd90DGMA/YQTISkZ6yb4KO84U/ 4M2c/fRHpGeT+5IIvW/1yyimvCayMu0Io23ViRdZE8VPfs6pPz/fzgq7rJT/fZTm1K pCV8PNL5Mejn6bfkaRXpqOg0NdfECWKZsMrLHZbY= 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> In-Reply-To: <87sfore40u.fsf@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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: , From: Paulo Neves via Gdb-patches Reply-To: Paulo Neves Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" 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