public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Kevin Pouget <kevin.pouget@gmail.com>
Cc: gdb-patches@sourceware.org, pmuldoon@redhat.com
Subject: Re: [PATCH] Add bp_location to Python interface
Date: Mon, 09 Jan 2012 17:23:00 -0000	[thread overview]
Message-ID: <83r4z8eqoa.fsf@gnu.org> (raw)
In-Reply-To: <CAPftXUL6KTe-WEFnWR38pVnGUJhmEQgZ0J7R7heeR3GHtmrf5g@mail.gmail.com>

> From: Kevin Pouget <kevin.pouget@gmail.com>
> Date: Mon, 9 Jan 2012 12:46:30 +0100
> Cc: pmuldoon@redhat.com
> 
> ping

Sorry for missing it the first time.

> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -9,6 +9,12 @@
>  * The binary "gdbtui" can no longer be built or installed.
>    Use "gdb -tui" instead.
>  
> +* Python scripting
> +
> +  ** A new method "gdb.Breakpoint.locations" has been added, as well as
> +     the class gdb.BpLocation to provide further details about breakpoint
> +     locations.
> +

This is OK.

> +@defun gdb.locations ()
> +Return a tuple containing a sequence of @code{gdb.BpLocation} objects 
> +(see below) associated with this breakpoint.  A breakpoint with no location
> +is a pending breakpoint (@xref{Set Breaks, , pending breakpoints}).

@pxref, not @xref, as this cross-reference is inside parentheses.

> +A breakpoint location is represented with a @code{gdb.BpLocation} object,
                                        ^^^^
"by"

> +which offers the following attributes (all read only) and methods.
> +Please note that breakpoint locations are very transient entities in
> +@value{GDBN}, so one should avoid keeping references to them.

I'd use "volatile" instead of "transient".  Also, perhaps a sentence
or two about _why_ the locations are volatile would help.  E.g., if I
knew what actions invalidate locations, I could avoid them and leave
the locations valid for longer.

> +owns this location.  This attribute is not writable.  From an implementation 
> +point of view, there is a @code{1 ... n} relation between a breakpoint and

"1 ... n" here means one to many?  If so, I suggest to say that
literally.

In any case, "@code{1 ... n}" is not a good idea, because of the
whitespace and because we use @dots{} instead of literal periods.  If
"one to many" is not what you meant, I can suggest how to mark up
whatever needs to be written here.

> +This attribute holds a reference to the @code{gdb.Inferior} inferior object

I'd drop the second instance of "inferior", it looks redundant.

> +@defun BpLocation.is_valid ()
> +Returns @code{True} if the @code{gdb.BpLocation} object is valid,
> +@code{False} if not.  A @code{gdb.BpLocation} object may be invalidated by
> +GDB at any moment for internal reasons.  All other @code{gdb.BpLocation}
> +methods and attributes will throw an exception if the object is invalid.

@value{GDBN} instead of "GDB".

In any case, the last 2 sentences sound scary: I could interpret them
as meaning I cannot trust the locations at all.  If that is indeed so,
what use are they?

Thanks.

  reply	other threads:[~2012-01-09 17:23 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-08 10:17 Kevin Pouget
2011-12-08 13:39 ` Phil Muldoon
2011-12-08 14:28   ` Kevin Pouget
2011-12-08 14:56 ` Phil Muldoon
2011-12-09 13:49   ` Kevin Pouget
2011-12-09 14:15     ` Phil Muldoon
2011-12-13 15:55       ` Kevin Pouget
2012-01-09 11:47         ` Kevin Pouget
2012-01-09 17:23           ` Eli Zaretskii [this message]
2012-01-10 15:09             ` Kevin Pouget
2012-01-10 16:03               ` Kevin Pouget
2012-01-10 17:25               ` Eli Zaretskii
2012-01-11 10:16                 ` Kevin Pouget
2012-01-11 10:27                   ` Eli Zaretskii
2012-01-10 22:24               ` Doug Evans
2012-01-11  9:05                 ` Kevin Pouget
2012-01-11 19:45                   ` Doug Evans
2012-01-27 13:04                     ` Kevin Pouget
2012-03-30 19:51                       ` Tom Tromey
2012-04-03 10:35                         ` Kevin Pouget
2012-04-03 12:15                           ` Phil Muldoon
2012-04-03 14:43                             ` Paul_Koning
2012-04-04  8:36                               ` Kevin Pouget
2012-05-09  7:18                                 ` Kevin Pouget
2012-04-05 16:27                           ` Eli Zaretskii

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=83r4z8eqoa.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=kevin.pouget@gmail.com \
    --cc=pmuldoon@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).