public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Tom Tromey <tromey@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 1/2] Add attributes and methods to gdb.Inferior
Date: Tue, 09 May 2023 19:15:23 +0300	[thread overview]
Message-ID: <83y1lxa3c4.fsf@gnu.org> (raw)
In-Reply-To: <20230509-dap-args-v1-1-16b5f0aa5cd6@adacore.com> (message from Tom Tromey via Gdb-patches on Tue, 09 May 2023 10:01:59 -0600)

> Date: Tue, 09 May 2023 10:01:59 -0600
> From: Tom Tromey via Gdb-patches <gdb-patches@sourceware.org>
> 
> This adds two new attributes and three new methods to gdb.Inferior.
> 
> The attributes let Python code see the command-line arguments and the
> name of "main".  Argument setting is also supported.
> 
> The methods let Python code manipulate the inferior's environment
> variables.
> ---
>  gdb/NEWS                                 |  10 ++
>  gdb/doc/python.texi                      |  43 ++++++++
>  gdb/python/py-inferior.c                 | 168 +++++++++++++++++++++++++++++++
>  gdb/testsuite/gdb.ada/py_range.exp       |   4 +
>  gdb/testsuite/gdb.python/py-inferior.exp |  36 +++++++
>  5 files changed, 261 insertions(+)

Thanks.

> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -170,6 +170,16 @@ info main
>       (program-counter) values, and can be used as the frame-id when
>       calling gdb.PendingFrame.create_unwind_info.
>  
> +  ** gdb.Inferior now has a new "arguments" attribute.  This holds the
> +     command-line arguments to the inferior, if known.
> +
> +  ** gdb.Inferior now has a new "main_name" attribute.  This holds the
> +     name of the inferior's "main", if known.
> +
> +  ** gdb.Inferior now has new methods "clear_env", "set_env", and
> +     "unset_env".  These can be used to modify the inferior's
> +     environment before it is started.
> +
>  *** Changes in GDB 13

This part is OK.

> +The environment that will be passed to the inferior can be changed
> +from Python.  These methods only take effect when the inferior is

"These methods" seems to allude to something that was described
before, but there's nothing.  So I would suggest either

  The methods described below only take effect when...

or

  The environment that will be passed to the inferior can be changed
  from Python by using the following methods.  These methods only take
  effect when...

Reviewed-By: Eli Zaretskii <eliz@gnu.org>

  reply	other threads:[~2023-05-09 16:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-09 16:01 [PATCH 0/2] Add more DAP launch parameters Tom Tromey
2023-05-09 16:01 ` [PATCH 1/2] Add attributes and methods to gdb.Inferior Tom Tromey
2023-05-09 16:15   ` Eli Zaretskii [this message]
2023-05-17 15:45     ` Tom Tromey
2023-05-10 10:17   ` Andrew Burgess
2023-05-17 15:32     ` Tom Tromey
2023-05-09 16:02 ` [PATCH 2/2] Add "args" and "env" parameters to DAP launch request Tom Tromey
2023-05-09 16:10   ` Eli Zaretskii
2023-05-16 19:06     ` Tom Tromey
2023-05-16 19:10       ` Eli Zaretskii
2023-05-16 19:20         ` Eli Zaretskii
2023-05-10 12:39   ` Andrew Burgess

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=83y1lxa3c4.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@adacore.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).