From: Andrew Burgess <aburgess@redhat.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 8/9] gdb/python: make the executable_changed event available from Python
Date: Thu, 28 Sep 2023 15:35:30 +0100 [thread overview]
Message-ID: <87a5t6wekt.fsf@redhat.com> (raw)
In-Reply-To: <838r96idmz.fsf@gnu.org>
Eli Zaretskii <eliz@gnu.org> writes:
>> Date: Sat, 16 Sep 2023 11:18:09 +0100
>> From: Andrew Burgess via Gdb-patches <gdb-patches@sourceware.org>
>>
>> gdb/NEWS | 5 ++
>> gdb/doc/python.texi | 32 +++++++
>> gdb/python/py-all-events.def | 1 +
>> gdb/python/py-event-types.def | 5 ++
>> gdb/python/py-progspace.c | 54 ++++++++++++
>> gdb/testsuite/gdb.python/py-exec-file.exp | 100 ++++++++++++++++++++++
>> 6 files changed, 197 insertions(+)
>
> Thanks.
>
>> diff --git a/gdb/NEWS b/gdb/NEWS
>> index 93bc9c6a2c0..10975dbb27b 100644
>> --- a/gdb/NEWS
>> +++ b/gdb/NEWS
>> @@ -297,6 +297,11 @@ info main
>> exact string passed by the user to these commands; the path will
>> have been partially resolved to an absolute path.
>>
>> + ** A new executable_changed event registry is available. This event
>> + emits ExecutableChangedEvent objects, which have 'progspace' (a
>> + gdb.Progspace) and 'reload' (a Boolean) attributes. This event
>> + is emitted when gdb.Progspace.executable_filename changes.
>> +
>> *** Changes in GDB 13
>
> This part is OK.
>
>> diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
>> index 206cf6b4e18..9f7c7cb076a 100644
>> --- a/gdb/doc/python.texi
>> +++ b/gdb/doc/python.texi
>> @@ -3893,6 +3893,38 @@
>> The @code{gdb.TargetConnection} that is being removed.
>> @end defvar
>>
>> +@item events.executable_changed
>> +Emit @code{gdb.ExecutableChangedEvent} which indicates that the
>> +@code{gdb.Progspace.executable_filename} has changed.
>> +
>> +Changed can mean that either, the value in
>> +@code{gdb.Progspace.executable_filename} has changed to a new path, or
>> +the executable pointed to by @code{gdb.Progspace.executable_filename}
>> +has changed on disk, and @value{GDBN} has reloaded it.
>
> This reads awkwardly, and uses "path" when it means "file name".
> Suggest to rephrase:
>
> This event is emitted when either the value of
> @code{gdb.Progspace.executable_filename} has changed to name a
> different file, or the executable file named by
> @code{gdb.Progspace.executable_filename} has changed on disk, and
> @value{GDBN} has therefore reloaded it.
>
>> +@defvar ExecutableChangedEvent.progspace
>> +The @code{gdb.Progspace} in which the current executable has changed.
>> +The path to the updated executable will be visible in
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> "The file name of the updated executable..."
>
>> +This attribute will be @code{True} if the value of
>> +@code{gdb.Progspace.executable_filename} didn't change, but the file
>> +pointed to instead changed on disk, and @value{GDBN} reloaded it.
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> "...but the file it names changed on disk instead, ...."
>
>> +When this attribute is @code{False}, the value in
>> +@code{gdb.Progspace.executable_filename} was changed to point to a new
>> +file. ^^^^^^^^^^^^^^^^^
> ^^^^
> "...to name a different file."
>
>> +Remember that @value{GDBN} tracks the executable file, and the symbol
> ^
> That comma is redundant.
>
> Reviewed-By: Eli Zaretskii <eliz@gnu.org>
Thanks Eli, I made all the updates you suggested for this series before
pushing it.
Thanks,
Andrew
next prev parent reply other threads:[~2023-09-28 14:35 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-16 10:18 [PATCH 0/9] Add executable_changed event to Python API Andrew Burgess
2023-09-16 10:18 ` [PATCH 1/9] gdb/doc: extend the description for Progspace.filename Andrew Burgess
2023-09-16 10:53 ` Eli Zaretskii
2023-09-16 10:18 ` [PATCH 2/9] gdb/python: new Progspace.symbol_file attribute Andrew Burgess
2023-09-16 10:56 ` Eli Zaretskii
2023-09-16 10:18 ` [PATCH 3/9] gdb/python: new Progspace.executable_filename attribute Andrew Burgess
2023-09-16 10:55 ` Eli Zaretskii
2023-09-16 10:18 ` [PATCH 4/9] gdb: remove one user of the executable changed observer Andrew Burgess
2023-09-16 10:18 ` [PATCH 5/9] gdb: remove final user of the executable_changed observer Andrew Burgess
2023-09-16 10:18 ` [PATCH 6/9] gdb: remove unnecessary notification of " Andrew Burgess
2023-09-16 10:18 ` [PATCH 7/9] gdb: pass more arguments to the " Andrew Burgess
2023-09-16 10:18 ` [PATCH 8/9] gdb/python: make the executable_changed event available from Python Andrew Burgess
2023-09-16 11:03 ` Eli Zaretskii
2023-09-28 14:35 ` Andrew Burgess [this message]
2023-09-16 10:18 ` [PATCH 9/9] gdb: use reopen_exec_file from reread_symbols Andrew Burgess
2023-09-19 14:08 ` Tom Tromey
2023-09-28 15:23 ` Andrew Burgess
2023-09-28 18:15 ` Tom Tromey
2023-09-29 10:17 ` Andrew Burgess
2023-09-29 15:18 ` Eli Zaretskii
2023-10-02 14:16 ` Tom Tromey
2023-09-29 14:42 ` Eli Zaretskii
2023-10-02 14:02 ` Tom Tromey
2023-10-02 16:19 ` Eli Zaretskii
2023-09-19 14:09 ` [PATCH 0/9] Add executable_changed event to Python API Tom Tromey
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=87a5t6wekt.fsf@redhat.com \
--to=aburgess@redhat.com \
--cc=eliz@gnu.org \
--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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).