From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 132DC3858C41 for ; Fri, 19 May 2023 16:09:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 132DC3858C41 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q02fS-0005Ef-Ty; Fri, 19 May 2023 12:09:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=syyt43LeKsdcMFW8pmjoUKSKEyspbG4fRSDjTv288PA=; b=PNCllcPewmAB Xpxht5jwenmEeFmJe1V2imHeoa68yWSJLT0spGhys+JwOFcG6djqmlBqeOuiruKlSzJS3cI2b3YCP oZuHL90W6AOtLSL6LzxArv3xkkqw4qOqBC750ozHNDZL+Ahw3cPXIAZSu9IQAtHbR9aRoe2bgVEJS oMzFnLkLm+riiMxr7w23zp+o7Cehe1meI3pq7/tSGiMRSoEUlGOOh0dGFx3w+M1GGRSRaJvuhrBra lwAo8fCj73W08+oDv/gKrrySPW77cY/ZF6cvpow53Bx/GrjUZBCJSJCV60pKMxDqO9xnpNfgsUKAy 8BWNbpko0mOHEuFGtM9RJQ==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q02fS-0004CU-DB; Fri, 19 May 2023 12:09:22 -0400 Date: Fri, 19 May 2023 19:09:38 +0300 Message-Id: <83bkigti9p.fsf@gnu.org> From: Eli Zaretskii To: Tom Tromey Cc: gdb-patches@sourceware.org In-Reply-To: <20230519154137.3303282-1-tromey@adacore.com> (message from Tom Tromey via Gdb-patches on Fri, 19 May 2023 09:41:37 -0600) Subject: Re: [PATCH] Update documentatio for Python Frame.older and Frame.newer References: <20230519154137.3303282-1-tromey@adacore.com> X-Spam-Status: No, score=-7.1 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,SPF_HELO_PASS,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 List-Id: > Cc: Tom Tromey > Date: Fri, 19 May 2023 09:41:37 -0600 > From: Tom Tromey via Gdb-patches > > I noticed that Frame.older and Frame.newer don't document that they > return None at the ends of the stack. This patch updates the > documentation, and also fixes a somewhat related typo in a comment > that I noticed while digging into this. > --- > gdb/doc/python.texi | 6 ++++-- > gdb/frame.c | 2 +- > 2 files changed, 5 insertions(+), 3 deletions(-) > > diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi > index d93ee55690e..4066dafb601 100644 > --- a/gdb/doc/python.texi > +++ b/gdb/doc/python.texi > @@ -5367,11 +5367,13 @@ Return the symbol for the function corresponding to this frame. > @end defun > > @defun Frame.older () > -Return the frame that called this frame. > +Return the frame that called this frame. If this is the oldest frame, > +@code{None} is returned. > @end defun > > @defun Frame.newer () > -Return the frame called by this frame. > +Return the frame called by this frame. If this is the newest frame, > +@code{None} is returned. > @end defun This is OK, but please use "return @code{None}" instead of "@code{None} is returned", to avoid passive voice. Thanks. Approved-By: Eli Zaretskii