From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id L6u5CLmtymmtoD8AWB0awg (envelope-from ) for ; Mon, 30 Mar 2026 13:07:05 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=gnu.org header.i=@gnu.org header.a=rsa-sha256 header.s=fencepost-gnu-org header.b=m9T/evIF; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 0FBC01E04F; Mon, 30 Mar 2026 13:07:05 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 329391E04F for ; Mon, 30 Mar 2026 13:07:04 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 26EFB4BA2E0E for ; Mon, 30 Mar 2026 17:07:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 26EFB4BA2E0E Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gnu.org header.i=@gnu.org header.a=rsa-sha256 header.s=fencepost-gnu-org header.b=m9T/evIF Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id C46874BA2E08 for ; Mon, 30 Mar 2026 17:06:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C46874BA2E08 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C46874BA2E08 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:142:3::10 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1774890397; cv=none; b=N/cSZOgCVZNFZERakggsEBIyRhr3TL2oGssJDP3nskjn5R4mXDVQ4AXEj/SlfbBu2W75D7TNWOSQYuZt1ukfQRNGR/lRlUdFV9hd6lqebSoEXuF7qkgoVRZRSmq2NGl4wwpPhChkBEekwQAjrs+ZkwDXneUxOHmhGaWaYCgwDuQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1774890397; c=relaxed/simple; bh=2D3o5PD9OX86rsV7eGDQKwpaKMKCWPoTUK8q3rYhI7U=; h=DKIM-Signature:Date:Message-Id:From:To:Subject; b=oGAWVDHZtHGdgjeHEBXCUZeJRSSAZKo8NaQtTWUFAicXDrEOKOLthJp6ZghPUE/4CjdZzg5mbZqZbYZL3K5rFZdEOLyGPQkj/xsT03siDrBrHxGD4/XEfsefIbj7GpzXt7a7A6CQ5kL+U5SFBgaixsi76EVhV+Y8Agb/QoNDKpY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C46874BA2E08 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w7G4M-0005uM-50; Mon, 30 Mar 2026 13:06:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=EXF9WGzhJXeK799lQSOn0gVp54k2jD4vxNCeny5EBfw=; b=m9T/evIFfnwD dN2C1U5tYRRZLVQubzhKHwC64WCdckKLhGEGEXNRzlCNWfOL8+EixxDKhDwU8/S1dvMxtY/zEW7HL NyOm/8m+irOmJKh7lP7C8rr7m3uXC3aFmc3b1o2omvKv4+b7E5ZTmTghf2nYSyxwqSELmg5YkHF8x xtoWjdNQx38EEWOpTU/auUhNf8gvbxnUHki4nh8Imm3zxQijUQYX/bTD/6863zaMZArMKtbsVUH9X dOVB4/DmDZfTvOlC/cVNFMYqZMUdert60f3RXkI16p7v7mhNGNh+V4ZU17Nbhy04Sz7gvEwcIFu1t mYEp1MMYQWbStRscr06iJA==; Date: Mon, 30 Mar 2026 20:06:25 +0300 Message-Id: <86o6k5p7qm.fsf@gnu.org> From: Eli Zaretskii To: Andrew Burgess Cc: gdb-patches@sourceware.org In-Reply-To: <7e010b61a2a9d995765011de53f3036c0b1b2b60.1774884529.git.aburgess@redhat.com> (message from Andrew Burgess on Mon, 30 Mar 2026 16:30:53 +0100) Subject: Re: [PATCH 3/3] gdb/python: new events.corefile_changed event References: <7e010b61a2a9d995765011de53f3036c0b1b2b60.1774884529.git.aburgess@redhat.com> X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org > From: Andrew Burgess > Cc: Andrew Burgess > 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