Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Thiago Jung Bauermann <bauerman@br.ibm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [rfc] python API exposing inferior's frame stack.
Date: Tue, 10 Mar 2009 23:37:00 -0000	[thread overview]
Message-ID: <ubps9kw6u.fsf@gnu.org> (raw)
In-Reply-To: <1236706351.11106.17.camel@localhost.localdomain>

> From: Thiago Jung Bauermann <bauerman@br.ibm.com>
> Date: Tue, 10 Mar 2009 14:32:31 -0300
> 
> This patch allows a Python script to work with the inferior's frame
> stack. For now, the only "entry point" for this API is the
> gdb.selected_frame function.

Thanks.  I have a few comments about the documentation part of the
patch.

> +@tindex gdb.Frame
> +@tindex Frame

Please don't use @tindex, we don't use such an index in the GDB
manual.

> +When the debugged program stops, @value{GDBN} is able to analyse its call
                                                            ^^^^^^^
"analyze", please.  We use the US spelling.

>                                                               If you try
> +to use an invalid frame object, a @code{RuntimeError} exception will be
> +thrown.

Let's try to avoid unnecessary passive tense, as doing that makes the
text more concise and easy to read:

  If you try to use an invalid frame object, @value{GDBN} will throw a
  @code{RuntimeError} exception.

> +@findex gdb.selected_frame
> +@defun selected_frame

@defun automatically defines an entry in the index, so you don't need
to have another @findex for it.

> +@findex gdb.frame_stop_reason_string
> +@defun frame_stop_reason_string @var{reason}

Likewise.  Also, no need to use @var in the @defun line to decorate
arguments: @defun does that automatically for you.  (You do need to
use @var in the text that describes the function, such as below:

> +Return a string explaining the reason why @value{GDBN} stopped unwinding
> +frames, as expressed by the given @var{reason} code (an integer, see the
> +@code{unwind_stop_reason} method further down in this section).

> +@defmethod Frame equals @code{frame}

"frame" is an argument, right?  Then it again does not need any
markup, certainly not @code.

>                            All @code{gdb.Frame} methods will throw
> +an exception if it is invalid at the time the method call is made.
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
"at the time the method is called".

> +Returns the type of the frame. The value can be one of
                                ^^
Two spaces between sentences, please.

> +@defmethod Frame unwind_stop_reason
> +Return an integer representing the reason why it's not possible to find
> +frames older than this.

"older"?  You mean, higher in the call stack?  Is "older" widespread
enough to be self-explanatory?

> +@defmethod Frame address_in_block
> +Returns an address which falls within the frame's code block.
> +@end defmethod

This is unclear to me.  Is there only one such address?  If not, why
is that useful to get _an_ address?

> +@defmethod Frame older
> +Return the frame immediately older (outer) to this frame.
> +@end defmethod
> +
> +@defmethod Frame newer
> +Return the frame immetidaely newer (inner) to this frame.
> +@end defmethod

Suggest to use "higher" or "above" or "towards the outermost frame".
Generally, try to use the terminology from  the "Examining the Stack"
chapter of the manual.

> +@defmethod Frame read_var @var{variable}

No need to use @var.

> +Return the value of the given variable in this frame.  @code{variable} must
                                                          ^^^^^^^^^^^^^^^
@var{variable}.


  reply	other threads:[~2009-03-10 19:35 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-10 18:00 Thiago Jung Bauermann
2009-03-10 23:37 ` Eli Zaretskii [this message]
2009-03-15 18:35   ` Thiago Jung Bauermann
2009-03-15 19:30     ` Eli Zaretskii
2009-03-16  3:36       ` Thiago Jung Bauermann
2009-03-16  4:07         ` Eli Zaretskii
2009-03-20 23:04           ` Thiago Jung Bauermann
2009-03-21  8:34             ` Eli Zaretskii
2009-03-30  5:33               ` Thiago Jung Bauermann
2009-03-30 18:35                 ` Eli Zaretskii
2009-03-30 19:09                 ` Tom Tromey
2009-03-30 19:24                   ` Thiago Jung Bauermann
2009-03-30 19:57                     ` Tom Tromey
2009-03-30 20:50                       ` Thiago Jung Bauermann
2009-03-22 16:00             ` Tom Tromey
2009-03-17 21:13   ` Tom Tromey
2009-03-17 22:43     ` Eli Zaretskii
2009-03-18  0:35       ` Tom Tromey
2009-03-18  4:12         ` 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=ubps9kw6u.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=bauerman@br.ibm.com \
    --cc=gdb-patches@sourceware.org \
    /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