From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18492 invoked by alias); 2 Jul 2011 21:54:07 -0000 Received: (qmail 18478 invoked by uid 22791); 2 Jul 2011 21:54:07 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-gx0-f169.google.com (HELO mail-gx0-f169.google.com) (209.85.161.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 02 Jul 2011 21:53:43 +0000 Received: by gxk23 with SMTP id 23so2030031gxk.0 for ; Sat, 02 Jul 2011 14:53:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.236.145.134 with SMTP id p6mr1471568yhj.61.1309643622428; Sat, 02 Jul 2011 14:53:42 -0700 (PDT) Received: by 10.236.109.169 with HTTP; Sat, 2 Jul 2011 14:53:42 -0700 (PDT) In-Reply-To: <83boxcr528.fsf@gnu.org> References: <83boxcr528.fsf@gnu.org> Date: Sat, 02 Jul 2011 21:54:00 -0000 Message-ID: Subject: Re: [patch][python][doc] PR 12918 reference decode_line in py SAL docs. From: Matt Rice To: Eli Zaretskii Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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/msg00071.txt.bz2 On Sat, Jul 2, 2011 at 10:00 AM, Eli Zaretskii wrote: >> 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 =A0Matt Rice =A0 >> >> =A0 =A0 =A0 =A0 * gdb.texinfo (Symbol Tables In Python): Add reference t= o the >> =A0 =A0 =A0 =A0 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 >> =A0is exposed to Python via two objects: @code{gdb.Symtab_and_line} and >> =A0@code{gdb.Symtab}. =A0Symbol table and line data for a frame is retur= ned >> =A0from the @code{find_sal} method in @code{gdb.Frame} object. >> -@xref{Frames In Python}. >> +@xref{Frames In Python}. =A0Symbol table and line data for an arbitrary >> +linespec is returned from the @code{decode_line} function. >> +@xref{Basic Python}. >> >> =A0For more information on @value{GDBN}'s symbol table management, see >> =A0@ref{Symbols, ,Examining the Symbol Table}, for more information. > > Thanks, but how does this address the PR? =A0This is the full text of > PR 12918: > > =A0There is no (obvious) documented way to get a symtab_and_line object g= iven an > =A0arbitrary address. > =A0A function gdb.sal_for_pc() similar to gdb.block_for_pc() would be nic= e. > > 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. > The answer to the PR's request is already documented in the `Specify Location' link[1] from decode_line answering it there directly I thought would be good, but a duplication of existing docs. So I thought that what was missing was the association from the perspective of `Symtab and line' Considering that `Symtab and line' already links to gdb.Frame as a way to get a Symtab_and_line object, its omission creates the impression of a missing feature. when i was looking for decode_line, I looked everywhere _except_ `Basic Python', Thus my hope was that a complete chain of links from the goal, would provoke a more keen investigation into existing docs. If someone has a better idea for further clarifying it i'm all for it. [1] http://sourceware.org/gdb/current/onlinedocs/gdb/Specify-Location.html#= Specify-Location