From: Eli Zaretskii <eliz@gnu.org>
To: Andrew Burgess <aburgess@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 3/3] gdb/python: new events.corefile_changed event
Date: Mon, 30 Mar 2026 20:06:25 +0300 [thread overview]
Message-ID: <86o6k5p7qm.fsf@gnu.org> (raw)
In-Reply-To: <7e010b61a2a9d995765011de53f3036c0b1b2b60.1774884529.git.aburgess@redhat.com> (message from Andrew Burgess on Mon, 30 Mar 2026 16:30:53 +0100)
> From: Andrew Burgess <aburgess@redhat.com>
> Cc: Andrew Burgess <aburgess@redhat.com>
> Date: Mon, 30 Mar 2026 16:30:53 +0100
>
> Add a new Python event registry, events.corefile_changed. This event
> is emitted each time the corefile within an inferior changes.
>
> The event object has a single 'inferior' attribute which is the
> gdb.Inferior object for which the core file changed. The user can
> then inspect Inferior.corefile to see details about the new core file,
> or this will be None if the core file was removed from the inferior.
>
> I've updated the existing test to cover this new event.
>
> The new test covers both the corefile_changed event, but also monitors
> the exited event. This ties in to the work done in the previous
> commit where we use whether the inferior has exited or not as a guard
> for whether core_target::exit_core_file_inferior should be called.
> Unloading a core file should result in a single corefile_changed event
> and a single exited event.
> ---
> gdb/NEWS | 5 +
> gdb/doc/python.texi | 11 ++
> gdb/python/py-all-events.def | 1 +
> gdb/python/py-corefile.c | 36 ++++++
> gdb/python/py-event-types.def | 5 +
> gdb/testsuite/gdb.python/py-corefile.exp | 140 ++++++++++++++++++++---
> gdb/testsuite/gdb.python/py-corefile.py | 117 +++++++++++++++++++
> 7 files changed, 296 insertions(+), 19 deletions(-)
Thanks, the documentation parts are okay.
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
prev parent reply other threads:[~2026-03-30 17:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-30 15:30 [PATCH 0/3] New Python events.corefile_changed API Andrew Burgess
2026-03-30 15:30 ` [PATCH 1/3] gdb: delete some unnecessary code from core_target::detach Andrew Burgess
2026-03-30 15:30 ` [PATCH 2/3] gdb: refactor core_target ::close and ::detach functions Andrew Burgess
2026-03-30 15:30 ` [PATCH 3/3] gdb/python: new events.corefile_changed event Andrew Burgess
2026-03-30 17:06 ` Eli Zaretskii [this message]
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=86o6k5p7qm.fsf@gnu.org \
--to=eliz@gnu.org \
--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