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.129.124]) by sourceware.org (Postfix) with ESMTPS id 87BCD38133D0 for ; Mon, 30 May 2022 09:55:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 87BCD38133D0 Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-483-DMKR_ijJOuCTGaPEOnNwXQ-1; Mon, 30 May 2022 05:55:19 -0400 X-MC-Unique: DMKR_ijJOuCTGaPEOnNwXQ-1 Received: by mail-qv1-f70.google.com with SMTP id eb5-20020ad44e45000000b0046447caa7a0so2263137qvb.16 for ; Mon, 30 May 2022 02:55:19 -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=513+kfxwixm9mOpccAvtA3H/+ebwH1thuRDNZ7WKBpQ=; b=4AT8Ty1NWllkdo05r3u3JAwgPJGNuBIVjhXeEZaPFvL8vl7MOaLpSPxK5xTkxmo7gG Jih8fc6GC+MLbQiT8opyoGyD4fnnfsYY40XRUgLzPoZMli8zPbSFedlgo2qbuTI4HtIt 6V3PCV2bWLtbGS3+zA3yhigViOqAwdT/o0RZ7YNISfCT1zH8+fCbe3L740DfV7n/PhxZ d5ClRh6XV8B337hewbQXaVZ19cg2buEXIjsStScgzfyJ62Pm4CJrHLmKzkReS9McFeAW gRO5wS/9IRk5NKSFjgwxN5ramAywSF3bGBlfsI6PXbD/o7IMBk2XMlsTkKxZWkIx7fn1 7U6g== X-Gm-Message-State: AOAM5303Auh1fCzOVmp/ZnBt9fx90V8nBoYtvvOpdUQqWAzl6gNG+Tz/ KotVMcI8tpF5i5GtZ5UqZYorrzrVbPJkdfoFmBi+ZLBDt33ytR/JXMOZy4QTSbbAuzlgqp/YYDs c9zNPJs/lHIZv25pIS15qyIc4Xn8KGmsGaFgP2gNzyqqxm7uBGGlU4pzfKLuxB0x5clgi3oCdsA == X-Received: by 2002:ac8:5812:0:b0:2f3:f380:f0fb with SMTP id g18-20020ac85812000000b002f3f380f0fbmr43462901qtg.367.1653904519131; Mon, 30 May 2022 02:55:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyP+PjhS2KAovMZCYzngkfUEVTs0yNAd1v5cZ6WlYIkqe70S1000xfT6CojqrBTHnf3mqsvUA== X-Received: by 2002:ac8:5812:0:b0:2f3:f380:f0fb with SMTP id g18-20020ac85812000000b002f3f380f0fbmr43462886qtg.367.1653904518858; Mon, 30 May 2022 02:55:18 -0700 (PDT) Received: from localhost (host109-152-215-36.range109-152.btcentralplus.com. [109.152.215.36]) by smtp.gmail.com with ESMTPSA id h189-20020a3753c6000000b006a61650043bsm2820436qkb.124.2022.05.30.02.55.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 02:55:18 -0700 (PDT) From: Andrew Burgess To: Paulo Neves via Gdb-patches , gdb-patches@sourceware.org Cc: Paulo Neves Subject: Re: [PATCH v2 1/3] gdb/python doc: Add register_unwinder to code example In-Reply-To: <20220528132905.3886575-1-ptsneves@gmail.com> References: <20220528115509.3865342-1-ptsneves@gmail.com> <20220528132905.3886575-1-ptsneves@gmail.com> Date: Mon, 30 May 2022 10:55:16 +0100 Message-ID: <87v8tne457.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.5 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:55:22 -0000 Paulo Neves via Gdb-patches writes: > It is now clear in the example code that an unwinder needs to be > registered to be used. > --- > gdb/doc/python.texi | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi > index cb5283e03c0..5b7fba798a9 100644 > --- a/gdb/doc/python.texi > +++ b/gdb/doc/python.texi > @@ -2814,6 +2814,8 @@ class MyUnwinder(Unwinder): > # Return the result: > return unwind_info > > +# To use an unwinder it needs to be registered and enabled. > +gdb.unwinder.register_unwinder (, MyUnwinder, replace=) > @end smallexample I've had reason to read the unwinder example before, and I think it's probably my most hated example in our manual. I absolutely hate that the example is not real, executable, EXAMPLE, code, it's just seems like documentation in another form. That said, I think its not fair for me to require that your additions to the existing example be executable, when the rest of the example is not. But, if you _did_ want to improve this whole example, then I'd certainly be in favour! I do however, this that with this addition, the example code is now in the wrong place. Notice your example now makes use of `register_unwinder`, but this method is not discussed in detail until after the example code. I think that the whole subsection titled `Unwinder Skeleton Code` should be moved later, probably to just before `@node Xmethods In Python`, that is, right at the end of the section on unwinders. Thanks, Andrew > > @subheading Registering a Unwinder > -- > 2.25.1