From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by sourceware.org (Postfix) with ESMTPS id 73D2E3858D1E for ; Fri, 30 Sep 2022 16:41:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 73D2E3858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f44.google.com with SMTP id bq9so7694195wrb.4 for ; Fri, 30 Sep 2022 09:41:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject :x-gm-message-state:from:to:cc:subject:date; bh=1pJ+zesfsFPEDN2YlGlO5t5FhE/qr2yBhztPdbtU5VE=; b=SooOqmA5/vuKEaMIPpXu0wTNx9ZoNzSMxjQ9i7isSX7ml+Q8mzAOdUinT6FDn1AhqN FMoMrYUOBAcBPbabI0oIafHTQXK7j1jRhc6aCevm05a4BPohtaAqE9tuGpMr28VuX/iS bwAJ+io7ZOMnBdOGm7Fj/GHW5Ych7wHAQaK0VzaVk3ldUTmDRyCBIvkU8lAOerN6Z1AM PNq6GB105pDwhGYQVZgxi8lwin9G0Y6L+AvGkVp8w/S4vRkBiLBdC2/GKys/TzPxQhq/ +33C83hBkeFukRSRkTCKkjFtgqg+VTSz+6m573s0D6r3+0xQBYObH/89AQc+VDtKO9eW nrag== X-Gm-Message-State: ACrzQf3fNZnw9lmwwlBNNAedPEqcUVUiVhfGpsA8EVnGkfk/M01LKJ1z yf8cYGZCwDrpmBNJrJ2TXWnTthuNYFugBA== X-Google-Smtp-Source: AMsMyM54eS3ApXpm7PPC/fQvq1H9Q/rts/Ry0DsWYs1yDnaVrd7TticYuUpsdM/JxiyP1HPAXbd1+w== X-Received: by 2002:a5d:5010:0:b0:22a:cb71:9493 with SMTP id e16-20020a5d5010000000b0022acb719493mr6510482wrt.514.1664556111885; Fri, 30 Sep 2022 09:41:51 -0700 (PDT) Received: from ?IPv6:2001:8a0:f93a:3b00:e038:5cdc:b8bf:4653? ([2001:8a0:f93a:3b00:e038:5cdc:b8bf:4653]) by smtp.gmail.com with ESMTPSA id k25-20020adfd239000000b0022af865810esm2311417wrh.75.2022.09.30.09.41.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 30 Sep 2022 09:41:50 -0700 (PDT) Subject: Re: [PATCH v3 4/4] gdb/python doc: Move unwinder skeleton code To: Eli Zaretskii Cc: ptsneves@gmail.com, gdb-patches@sourceware.org References: <20220528115509.3865342-1-ptsneves@gmail.com> <20220603160139.136115-1-ptsneves@gmail.com> <20220603160139.136115-4-ptsneves@gmail.com> <83wndxbtwn.fsf@gnu.org> <8ed127eb-221b-2b85-1019-1968060f68bc@palves.net> <83y1u0dfjm.fsf@gnu.org> From: Pedro Alves Message-ID: <2ad190e6-7892-d3f6-3426-46878c87a4fa@palves.net> Date: Fri, 30 Sep 2022 17:41:50 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <83y1u0dfjm.fsf@gnu.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.5 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP 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, 30 Sep 2022 16:41:58 -0000 On 2022-09-30 4:53 p.m., Eli Zaretskii wrote: >> Cc: gdb-patches@sourceware.org >> From: Pedro Alves >> Date: Fri, 30 Sep 2022 15:50:20 +0100 >> >> So I think the manual should be fixed by dropping the "or @code{gdb}", resulting in: >> >> Passing @code{None} adds @var{unwinder} to the @value{GDBN}'s global unwinder list. >> >> Actually, the "the" in "to the @value{GDBN}'s" looks wrong to me. So I think we >> should really say: >> >> Passing @code{None} adds @var{unwinder} to @value{GDBN}'s global unwinder list. > > How about > > If @var{locus} is @code{None}, that stands for @value{GDBN}'s global > unwinder list. > > I think this is clearer and less likely to cause misinterpretation. > Seems fine in isolation, but looking at the whole paragraph, how about similar text to what's in gdb/python/lib/gdb/unwinder.py? Seems clear enough to me. I also noticed a couple instances of "a unwinder", also fixed. While at it, "GDB proper" seems like a weird conception. How about this? >From 7c5e7875bed7f4316823db67d95821c88c679daf Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Fri, 30 Sep 2022 17:23:03 +0100 Subject: [PATCH] Python Change-Id: I98c1b1000e1063815238e945ca71ec6f37b5702e --- gdb/doc/python.texi | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi index 2692211f388..4a7b047c3e0 100644 --- a/gdb/doc/python.texi +++ b/gdb/doc/python.texi @@ -2861,21 +2861,21 @@ class MyUnwinder(Unwinder): @end smallexample -@subheading Registering a Unwinder +@subheading Registering an Unwinder -An object file, a program space, and the @value{GDBN} proper can have -unwinders registered with it. +Object files and program spaces can have unwinders registered with +them. In addition, you can also register unwinders globally. -The @code{gdb.unwinders} module provides the function to register a +The @code{gdb.unwinders} module provides the function to register an unwinder: @defun gdb.unwinder.register_unwinder (locus, unwinder, replace=False) -@var{locus} is specifies an object file or a program space to which -@var{unwinder} is added. Passing @code{None} or @code{gdb} adds -@var{unwinder} to the @value{GDBN}'s global unwinder list. The newly -added @var{unwinder} will be called before any other unwinder from the +@var{locus} specifies which unwinder list the @var{unwinder} is +prepended to. It can be either an object file, a program space, or +@code{None}, in which case the unwinder is registered globally. The +newly added @var{unwinder} will be called before any other unwinder from the same locus. Two unwinders in the same locus cannot have the same -name. An attempt to add a unwinder with already existing name raises +name. An attempt to add an unwinder with an already existing name raises an exception unless @var{replace} is @code{True}, in which case the old unwinder is deleted. @end defun base-commit: cfc0ffd31e90972296b81d362a7d83eb60eb21c0 -- 2.36.0