From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 47831 invoked by alias); 8 Sep 2018 20:14:28 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 47799 invoked by uid 89); 8 Sep 2018 20:14:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.4 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1096 X-HELO: gateway22.websitewelcome.com Received: from gateway22.websitewelcome.com (HELO gateway22.websitewelcome.com) (192.185.46.229) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 08 Sep 2018 20:14:25 +0000 Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4]) by gateway22.websitewelcome.com (Postfix) with ESMTP id AA9BFBFDD for ; Sat, 8 Sep 2018 15:14:23 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id yjcdfzzkjBcCXyjcdfRV8N; Sat, 08 Sep 2018 15:14:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=xRwPzCBmMruEzce8KpkCCAyou4+sDfN10gxYyNIPkJE=; b=YWFIb4ZMIW2OuYibUj6ptbnCb8 //YiINv+6GNsv2bTnmzaBt/TwczKfmjHSy67iAluAOVwv6vcTpmk4k1oEQ5Gy8rLnuA6Rfx0Wkif8 VLZLWZNwtg0L2P6gwYDdifS8k; Received: from 75-166-85-72.hlrn.qwest.net ([75.166.85.72]:47090 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1fyjcd-002ImX-EI; Sat, 08 Sep 2018 15:14:23 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 03/14] Document that Frame.block can throw Date: Sat, 08 Sep 2018 20:14:00 -0000 Message-Id: <20180908201417.13444-4-tom@tromey.com> In-Reply-To: <20180908201417.13444-1-tom@tromey.com> References: <20180908201417.13444-1-tom@tromey.com> X-SW-Source: 2018-09/txt/msg00167.txt.bz2 PR python/16484 points out that Frame.block can throw an exception, but this is not documented. This patch fixes the documentation. Changing Frame.block to return None would be nice, but I suspect it's too late for that change. gdb/doc/ChangeLog 2018-09-08 Tom Tromey PR python/16484: * python.texi (Frames In Python): Document that Frame.block can throw. --- gdb/doc/ChangeLog | 6 ++++++ gdb/doc/python.texi | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi index 86a91110e0e..e1b79cc30b2 100644 --- a/gdb/doc/python.texi +++ b/gdb/doc/python.texi @@ -4321,7 +4321,10 @@ Returns the frame's resume address. @end defun @defun Frame.block () -Return the frame's code block. @xref{Blocks In Python}. +Return the frame's code block. @xref{Blocks In Python}. If the frame +does not have a block -- for example, if there is no debugging +information for the code in question -- then this will throw an +exception. @end defun @defun Frame.function () -- 2.13.6