From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8582 invoked by alias); 2 Jul 2011 17:00:30 -0000 Received: (qmail 8574 invoked by uid 22791); 2 Jul 2011 17:00:29 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout22.012.net.il (HELO mtaout22.012.net.il) (80.179.55.172) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 02 Jul 2011 17:00:14 +0000 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0LNP00G00TRJSA00@a-mtaout22.012.net.il> for gdb-patches@sourceware.org; Sat, 02 Jul 2011 20:00:13 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.228.8.216]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LNP00GRATWAOL30@a-mtaout22.012.net.il>; Sat, 02 Jul 2011 20:00:12 +0300 (IDT) Date: Sat, 02 Jul 2011 17:00:00 -0000 From: Eli Zaretskii Subject: Re: [patch][python][doc] PR 12918 reference decode_line in py SAL docs. In-reply-to: To: Matt Rice Cc: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83boxcr528.fsf@gnu.org> References: X-IsSubscribed: yes 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 X-SW-Source: 2011-07/txt/msg00070.txt.bz2 > Date: Sat, 2 Jul 2011 07:20:08 -0700 > From: Matt Rice > > here is an attempt at 12918, along with the original reporter, > I also had overlooked the decode_line method. > > 2011-07-02 Matt Rice > > * gdb.texinfo (Symbol Tables In Python): Add reference to the > decode_line function. > > diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo > index dbaf30e..cbfaddd 100644 > --- a/gdb/doc/gdb.texinfo > +++ b/gdb/doc/gdb.texinfo > @@ -23258,7 +23258,9 @@ Access to symbol table data maintained by @value{GDBN} on the inferior > is exposed to Python via two objects: @code{gdb.Symtab_and_line} and > @code{gdb.Symtab}. Symbol table and line data for a frame is returned > from the @code{find_sal} method in @code{gdb.Frame} object. > -@xref{Frames In Python}. > +@xref{Frames In Python}. Symbol table and line data for an arbitrary > +linespec is returned from the @code{decode_line} function. > +@xref{Basic Python}. > > For more information on @value{GDBN}'s symbol table management, see > @ref{Symbols, ,Examining the Symbol Table}, for more information. Thanks, but how does this address the PR? This is the full text of PR 12918: There is no (obvious) documented way to get a symtab_and_line object given an arbitrary address. A function gdb.sal_for_pc() similar to gdb.block_for_pc() would be nice. If you want to tell that decode_line is the answer for the PR's request, then why not update the documentation of decode_line, which is almost 2000 lines earlier in the manual and in a different node? IOW, why are you adding this text in this particular place? Sorry if I'm missing something obvious.