From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd32.google.com (mail-io1-xd32.google.com [IPv6:2607:f8b0:4864:20::d32]) by sourceware.org (Postfix) with ESMTPS id F3B263858C41 for ; Fri, 19 May 2023 15:41:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F3B263858C41 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-io1-xd32.google.com with SMTP id ca18e2360f4ac-76c5749b10fso90059539f.2 for ; Fri, 19 May 2023 08:41:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1684510907; x=1687102907; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=PQqrypBB7Rdzorq+vnepfbLYnClue2PXA0pWc4TigMQ=; b=Ue8z5OitQcQdCjEDjN++x7sg71JUqbIP9XPy4QLXX3mzSa49n5Pr/zW3AXXw6ksKXA u310QJBi7h6iyCAYlM/wzLB4Q+xP0EJLbbCOq1oJ+U0h6rCM1TsE6LkOvt5ycrtjZkAC Vh097FZWZ4fIPS8Mk/TutTwu6olt0DjBfEGlkL8fSvzFPQxL5108M4uuYnt09fUiC4K7 zx74i+nfKNAaJNW8Hhj7cGQ9i0yhsnyhPi6tLLx2N/AJfd/nDwoF+65NBWlsRueqXo+A LoCmVrdxja+vYsOEbwcKZYeAIYB+DEgDTWIi0ASb4WkG6PUK3yBca/JJrIiTgFNs5y0E xSlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684510907; x=1687102907; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=PQqrypBB7Rdzorq+vnepfbLYnClue2PXA0pWc4TigMQ=; b=HP+M/fQTLcb/AWkv3UhgyaAO/c4WlCw+xvUFsDOGJgEMAMFjYQC5EatN+0Eieh0T2L Dr7pW/NccuAHyQNkYYGx0zDcYxtUz1sWyw3UKnsO55yh5MBX5lXW0LesMg+PtZxgI89M 3XFaUwTfx+yoFfVprTCpTlmaDL38IPeXPl5OhzLvni7eEolgnj3NHOZy1qbys5sd/Y8T L87X3Xtmlwd/LeU2XNbLO0p/xH5n885THOw//7t+hVvTnpsodGZnckj8Ct9LxsD+BB81 qGc6IgM77kBT9n7hpUduqCiENIldcPIpCneKEEmx4m2ZtS0s/5jKA41CGq4HyNiSv+5H BslQ== X-Gm-Message-State: AC+VfDzvLI4JyXFUInyr9GqIAexmHX4VE9lyRExq/Scfr7zXvxsSnq5c J/TiKo1as1CQjIX74dAfV9fgGZPxTk3W9NvdoET4Mg== X-Google-Smtp-Source: ACHHUZ50GWeIIjOHzq+sKN6GaX6ISwg8T54Q2aCN+Ep2Y1tHTdhcmeBarDR232Zp0h4fQCbBBNQaeg== X-Received: by 2002:a92:d58e:0:b0:338:3543:728c with SMTP id a14-20020a92d58e000000b003383543728cmr1527239iln.7.1684510907261; Fri, 19 May 2023 08:41:47 -0700 (PDT) Received: from localhost.localdomain (75-166-157-55.hlrn.qwest.net. [75.166.157.55]) by smtp.gmail.com with ESMTPSA id k4-20020a056638140400b0040fa45dbec2sm1219830jad.99.2023.05.19.08.41.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 May 2023 08:41:46 -0700 (PDT) From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH] Update documentatio for Python Frame.older and Frame.newer Date: Fri, 19 May 2023 09:41:37 -0600 Message-Id: <20230519154137.3303282-1-tromey@adacore.com> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,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 List-Id: 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 @defun Frame.find_sal () diff --git a/gdb/frame.c b/gdb/frame.c index c8b8d2e257e..57d53410cc0 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -2601,7 +2601,7 @@ inside_entry_func (frame_info_ptr this_frame) } /* Return a structure containing various interesting information about - the frame that called THIS_FRAME. Returns NULL if there is entier + the frame that called THIS_FRAME. Returns NULL if there is either no such frame or the frame fails any of a set of target-independent condition that should terminate the frame chain (e.g., as unwinding past main()). -- 2.40.0