Message ID | 20180912193617.16523-3-simon.marchi@ericsson.com |
---|---|
State | New, archived |
Headers |
Received: (qmail 95514 invoked by alias); 12 Sep 2018 19:36:54 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <gdb-patches.sourceware.org> List-Unsubscribe: <mailto:gdb-patches-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 95500 invoked by uid 89); 12 Sep 2018 19:36:54 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1132 X-HELO: sesbmg23.ericsson.net Received: from sesbmg23.ericsson.net (HELO sesbmg23.ericsson.net) (193.180.251.37) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 12 Sep 2018 19:36:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; d=ericsson.com; s=mailgw201801; c=relaxed/simple; q=dns/txt; i=@ericsson.com; t=1536781010; h=From:Sender:Reply-To:Subject:Date:Message-Id:To:CC:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=UQFu48Dr/RFjKljGd0SF1fMQcvOm41q0tQZB5l9weWk=; b=Xze2FQwLyV6D6MLuiZqNumEyBQC2m8P5rnwdFXLn/CtCxvboOgAd/6d5OSPu/L3y VEv87JOf2crh9bwxksTWshO0Tn3TV0xWLWLW9FBeoL5qYzgpp/eg4o5P0i0EUwzz IUbRKRKEO+ASsKdIg+4k0TdW04IEwGxi1pLkgmNt40g=; Received: from ESESBMB501.ericsson.se (Unknown_Domain [153.88.183.114]) by sesbmg23.ericsson.net (Symantec Mail Security) with SMTP id D1.05.05037.2DA699B5; Wed, 12 Sep 2018 21:36:50 +0200 (CEST) Received: from ESESSMR502.ericsson.se (153.88.183.110) by ESESBMB501.ericsson.se (153.88.183.184) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Wed, 12 Sep 2018 21:36:50 +0200 Received: from ESESSMB504.ericsson.se (153.88.183.165) by ESESSMR502.ericsson.se (153.88.183.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Wed, 12 Sep 2018 21:36:50 +0200 Received: from NAM04-CO1-obe.outbound.protection.outlook.com (153.88.183.157) by ESESSMB504.ericsson.se (153.88.183.165) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3 via Frontend Transport; Wed, 12 Sep 2018 21:36:49 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Lc/wlsEsOQUQkeIg3PwCCQFQz8uzUFsP4fpMmtc1jpQ=; b=LujtlF7jMuifdqW8ROSueJxVEkq0b6mlygBXTz7p0gQyL+mU4kdNZPsDSedv9ETqK2MVKbtxHZ59WovPSWUvWjsLcp736fKddnfZ00pC9LEAYGZgz+gT7rcLG3lljP+4UvLuX704FMfSPJgUgt+xNj/wvS8OdS/R84zEPJzYSLI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=simon.marchi@ericsson.com; Received: from elxacz23q12.ericsson.se (192.176.1.81) by BYAPR15MB2389.namprd15.prod.outlook.com (2603:10b6:a02:8c::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1122.15; Wed, 12 Sep 2018 19:36:46 +0000 From: Simon Marchi <simon.marchi@ericsson.com> To: <gdb-patches@sourceware.org> CC: Simon Marchi <simon.marchi@ericsson.com> Subject: [PATCH 3/3] python: Fix erroneous doc about gdb.objfiles() Date: Wed, 12 Sep 2018 15:36:17 -0400 Message-Id: <20180912193617.16523-3-simon.marchi@ericsson.com> In-Reply-To: <20180912193617.16523-1-simon.marchi@ericsson.com> References: <20180912193617.16523-1-simon.marchi@ericsson.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain Return-Path: simon.marchi@ericsson.com Received-SPF: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts) X-IsSubscribed: yes |
Commit Message
Simon Marchi
Sept. 12, 2018, 7:36 p.m. UTC
The code implementing gdb.objfiles() returns a list of objfiles for the current program space (the program space of the selected inferior). The documentation for the gdb.objfiles() Python method, however, states: Return a sequence of all the objfiles current known to GDB. That sounds wrong to me. I tried to phrase to be more precise. gdb/doc/ChangeLog: * python.texi (Objfiles In Python): Update gdb.objfiles() doc. --- gdb/doc/python.texi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
Comments
>>>>> "Simon" == Simon Marchi <simon.marchi@ericsson.com> writes:
Simon> +Return a sequence of objfiles for the current program space (and by extension,
Simon> +for the selected inferior) @xref{Objfiles In Python} and
Simon> +@pxref{Progspaces In Python}.
The 'by extension' text seems mildly confusing to me.
Maybe it could say something like:
Return a sequence of all the objfiles referenced by this program
space. @xref{Objfiles In Python}. Note that lThis is the same as the
objfiles for the selected inferior.
Or something else equally direct?
Tom
> From: Simon Marchi <simon.marchi@ericsson.com> > CC: Simon Marchi <simon.marchi@ericsson.com> > Date: Wed, 12 Sep 2018 15:36:17 -0400 > > diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi > index abda135e17d..a9de6bd815e 100644 > --- a/gdb/doc/python.texi > +++ b/gdb/doc/python.texi > @@ -4104,8 +4104,9 @@ this function returns @code{None}. > > @findex gdb.objfiles > @defun gdb.objfiles () > -Return a sequence of all the objfiles current known to @value{GDBN}. > -@xref{Objfiles In Python}. > +Return a sequence of objfiles for the current program space (and by extension, > +for the selected inferior) @xref{Objfiles In Python} and > +@pxref{Progspaces In Python}. > @end defun "By extension" confuses me. And there should be a period before @xref and a comma after its closing brace. Thanks.
On 2018-09-12 22:36, Eli Zaretskii wrote: >> From: Simon Marchi <simon.marchi@ericsson.com> >> CC: Simon Marchi <simon.marchi@ericsson.com> >> Date: Wed, 12 Sep 2018 15:36:17 -0400 >> >> diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi >> index abda135e17d..a9de6bd815e 100644 >> --- a/gdb/doc/python.texi >> +++ b/gdb/doc/python.texi >> @@ -4104,8 +4104,9 @@ this function returns @code{None}. >> >> @findex gdb.objfiles >> @defun gdb.objfiles () >> -Return a sequence of all the objfiles current known to @value{GDBN}. >> -@xref{Objfiles In Python}. >> +Return a sequence of objfiles for the current program space (and by >> extension, >> +for the selected inferior) @xref{Objfiles In Python} and >> +@pxref{Progspaces In Python}. >> @end defun > > "By extension" confuses me. And there should be a period before @xref > and a comma after its closing brace. > > Thanks. Hi Eli, This changed in the v2 I just sent 5 minutes ago :). I stole the text from an old patch of Tom, which says This is identical to gdb.selected_inferior().progspace.objfiles() and is included for historical compatibility. Which makes what I was trying to say here unnecessary. Simon
diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi index abda135e17d..a9de6bd815e 100644 --- a/gdb/doc/python.texi +++ b/gdb/doc/python.texi @@ -4104,8 +4104,9 @@ this function returns @code{None}. @findex gdb.objfiles @defun gdb.objfiles () -Return a sequence of all the objfiles current known to @value{GDBN}. -@xref{Objfiles In Python}. +Return a sequence of objfiles for the current program space (and by extension, +for the selected inferior) @xref{Objfiles In Python} and +@pxref{Progspaces In Python}. @end defun @findex gdb.lookup_objfile