From: Tom Tromey <tom@tromey.com>
To: Andrew Burgess via Gdb-patches <gdb-patches@sourceware.org>
Cc: Andrew Burgess <aburgess@redhat.com>
Subject: Re: [PATCH] gdb: add Python events for program space addition and removal
Date: Thu, 21 Sep 2023 13:20:40 -0600 [thread overview]
Message-ID: <87cyyb72pj.fsf@tromey.com> (raw)
In-Reply-To: <634d50951c6a4d50b0aa8dc91758c025738e8c68.1695300249.git.aburgess@redhat.com> (Andrew Burgess via Gdb-patches's message of "Thu, 21 Sep 2023 13:44:50 +0100")
>>>>> "Andrew" == Andrew Burgess via Gdb-patches <gdb-patches@sourceware.org> writes:
Andrew> Initially I just wanted a Python event for when GDB removes a program
Andrew> space, I'm writing a Python extension that caches information for each
Andrew> program space, and need to know when I should discard entries for a
Andrew> particular program space.
Andrew> But, it seemed easy enough to also add an event for when GDB adds a
Andrew> new program space, so I went ahead and added both new events.
This approach seems totally fine to me, but it's worth noting that you
could attach data directly to a Progspace if the tp_hash field were
filled in. Some other Python classes in gdb do this. This makes caches
easier because the cleanup is automatic.
Andrew> +No @code{NewProgspaceEvent} is emitted for the very first program
Andrew> +space, which is assigned to the first inferior. This first program
Andrew> +space is created within @value{GDBN} before and Python scripts are
Typo, "before any"
Other than that it looks good.
Approved-By: Tom Tromey <tom@tromey.com>
Tom
next prev parent reply other threads:[~2023-09-21 19:20 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-21 12:44 Andrew Burgess
2023-09-21 19:20 ` Tom Tromey [this message]
2023-09-27 10:51 ` Andrew Burgess
2023-09-27 14:20 ` Tom Tromey
2023-09-27 15:17 ` Andrew Burgess
2023-09-27 15:16 ` [PATCHv2] " Andrew Burgess
2023-09-29 12:41 ` Eli Zaretskii
2023-09-29 13:24 ` [PATCHv3] " Andrew Burgess
2023-09-29 15:46 ` Eli Zaretskii
2023-10-02 16:09 ` Andrew Burgess
2023-10-02 18:34 ` Simon Marchi
2023-10-02 20:36 ` Andrew Burgess
2023-10-02 20:38 ` Simon Marchi
2023-10-02 21:17 ` Andrew Burgess
2023-10-02 20:11 ` [PUSHED] gdb/python: reformat file with black 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=87cyyb72pj.fsf@tromey.com \
--to=tom@tromey.com \
--cc=aburgess@redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).