public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Phil Muldoon <pmuldoon@redhat.com>
Cc: tromey@redhat.com, brobecker@adacore.com, gdb-patches@sourceware.org
Subject: Re: [patch] Add solib_address and decode_line Python functionality
Date: Fri, 06 Aug 2010 15:36:00 -0000	[thread overview]
Message-ID: <83hbj7wyaa.fsf@gnu.org> (raw)
In-Reply-To: <4C5C1418.7030607@redhat.com>

> Date: Fri, 06 Aug 2010 14:54:32 +0100
> From: Phil Muldoon <pmuldoon@redhat.com>
> CC: Joel Brobecker <brobecker@adacore.com>,        gdb-patches ml <gdb-patches@sourceware.org>
> 
> +@findex gdb.decode_line
> +@defun decode_line @r{[}expression@r{]}
> +Decode the optional argument @var{expression} the way that
> +@value{GDBN}'s inbuilt @code{break} or @code{edit} commands do
> +(@pxref{Specify Location}).  This function returns a Python tuple
> +containing two elements.  The first element contains a string holding
> +any unparsed section of @var{expression} (or @code{None} if the
> +expression has been fully parsed).  The second element contains either
> +@code{None} or another tuple that contains all the locations that
> +match the expression represented as @code{gdb.Symtab_and_line} objects
> +(@pxref{Symbol Tables In Python}).  If @var{expression} is not
> +provided, the current location is returned.

This is okay, but I would suggest to explain what happens without the
argument first.  Readers shouldn't need to read all the description of
how the argument is parsed if they don't want to pass it.

Something like

  @findex gdb.decode_line
  @defun decode_line @r{[}expression@r{]}
  Return location of the line specified by @var{expression}, or of the
  current line if no argument was given.  This function returns a Python
  tuple containing two elements.  The first element contains a string
  holding any unparsed section of @var{expression} (or @code{None} if
  the expression has been fully parsed).  The second element contains
  either @code{None} or another tuple that contains all the locations
  that match the expression represented as @code{gdb.Symtab_and_line}
  objects (@pxref{Symbol Tables In Python}).  If @var{expression}
  provided, it is decoded the way that @value{GDBN}'s inbuilt
  @code{break} or @code{edit} commands do (@pxref{Specify Location}).

Thanks.

  reply	other threads:[~2010-08-06 15:36 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-19 15:43 Phil Muldoon
2010-07-27 16:26 ` Joel Brobecker
2010-07-28 11:35   ` Phil Muldoon
2010-07-28 17:39     ` Joel Brobecker
2010-07-28 17:48     ` Eli Zaretskii
2010-07-29 20:39     ` Tom Tromey
2010-08-06 13:55       ` Phil Muldoon
2010-08-06 15:36         ` Eli Zaretskii [this message]
2010-08-06 22:39         ` Tom Tromey
2010-08-10 11:17           ` Phil Muldoon
2010-08-10 17:07             ` Eli Zaretskii
2010-08-10 18:24             ` Tom Tromey
2010-08-11 13:16               ` Phil Muldoon
2010-08-13 14:07               ` Ken Werner
2010-08-13 14:14                 ` Phil Muldoon
2010-08-13 15:48                 ` Tom Tromey
2010-08-13 16:22                   ` Ken Werner
2010-08-18 23:55 ` Pedro Alves
2010-08-19 16:32   ` Tom Tromey
2010-08-19 17:04     ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83hbj7wyaa.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pmuldoon@redhat.com \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).