From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id UQZ0JrMVt2j+ThIAWB0awg (envelope-from ) for ; Tue, 02 Sep 2025 12:05:07 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=G+T96ygs; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 98EB31E087; Tue, 02 Sep 2025 12:05:07 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.8 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_LOW,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=no autolearn_force=no version=4.0.1 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (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 12CBC1E057 for ; Tue, 02 Sep 2025 12:05:07 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A6949385AC31 for ; Tue, 2 Sep 2025 16:05:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A6949385AC31 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=G+T96ygs Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id 056FA385AC2E for ; Tue, 2 Sep 2025 16:03:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 056FA385AC2E Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 056FA385AC2E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1756829038; cv=none; b=hkxfax7d+WSDS2Z7y49jh7qWa995yJECRxATGOSTE+ikY8Ngscl0HZSbRcsou8JuGoLvlynHj9XUp07WEEk1UNdx4fwmnDFRsbWqOdUh3M9KuxAlL4kC59vpVdk5rRgnHnq4NyQg9WNRJjv8BQLN4aMZPRjo1YLoLoF+C4RXVD4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1756829038; c=relaxed/simple; bh=PLvCFM4t8WkI9hVUiY4nCwtfkYt+Ooxbjxz5H18Z7/U=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Vn0hiMZOkrY04b4YLCUfDCADsCYEXufxs1ls+3fa54RF4rhCBuxeMOEh7GnWkgdqlhsb0/PRO3zVFmPgC7Y4NVuteqabKq3BsrxalAhdDS/m26VoLtCELKKpqCdQZ7t9Nwq5jRC8PLrlWo75KvPH8cC39+w9V6P94ahVbOJxLVQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 056FA385AC2E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1756829037; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vDdmlMTQYd6qEu6xwucN4c9CJNXuFW+JKmivStaltIA=; b=G+T96ygsOWcjNiakp9nXEsbEHbNIGKCnmdsIK6dduiYOMhSeIX7bgV7mW6HjhHqx6bwk01 PsgKKpcEdi0rkubIs9rl/U3kSZJLwSso8bBic1J29fTlAiRMVn1GGCe9UuvQoh8xqSP4mI P9mBXAkTyBoMtD/WV37FcljtWrfy4xM= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-91-yT4iK2pTOGGqqI1qgAs8OQ-1; Tue, 02 Sep 2025 12:03:56 -0400 X-MC-Unique: yT4iK2pTOGGqqI1qgAs8OQ-1 X-Mimecast-MFC-AGG-ID: yT4iK2pTOGGqqI1qgAs8OQ_1756829035 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-45b99c18484so4257775e9.1 for ; Tue, 02 Sep 2025 09:03:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756829035; x=1757433835; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=vDdmlMTQYd6qEu6xwucN4c9CJNXuFW+JKmivStaltIA=; b=leQsWo/wJNYWDNo8iAQP3xpUPsEliDRzFyespL+wGZd8o6VDWxH8VbN63nk2pYF7LY mUdjrmuE5y4bOp513sOjDZXkoV5HcXxcdQJVTOdHCWHRd5xJvCl7rdwkKvXOuYDAlyMC dv0o+3nFvER2wjydlVlS8oNVKcg1uUjGO4YyuwuqLCUxwY01GD1LAdTX3aWoMkQucW6i rguabxtXjHPOKwmgWc1irgPlDVWpoCG8WsYh7kh5FAR6pzs06zeb3SmSj+Ssr1EusOpb WE2zHlSd/oGIbHMF4Tbae9qzRUgud6X3YkbYssqaV7JUKRXyci2SFv3O6/nfLxmD3DBy c6Vw== X-Gm-Message-State: AOJu0YwPiUu3g93xy/uHqBVB6OySntoACMDLwmSV7tw3HUKM+vsPSddr TPM7RZ/gmbMmaJVFVdg/LRF1zD5AVaqcs4bq7ykeM2DLYO0ap4l5SKxOdTyRAlOpdY6EU36FSMb 1yxfR7ONs7N6i4U/QG+yPe+Evx8p5X+P/nEYCzuPONmxRx6eK3OjxmemtaEhOUvG65YQjalP0p6 C/oNSOou7bzOL+RvgPgK+unNNZAulp6szjzXIjxsyq2rDec9c= X-Gm-Gg: ASbGncs9g4+XygtdG0YCAUo5bw3AF+Z9usnJcUpsSE83YybXYBy5oYsxEZC+GCCjT66 1UyD3en4d62U5SxoRqy2ARlYXDVOtew7ck7/ZHHqKTvO5DIUHrNtgWJVDNyZ4b/ygzfF+bu3QpQ nn18uRtEx/LMSqKgn/3AHoDLsUbdP8GC38JcMYvrnBXkuOBITrT2M7sgH4O+mMDp7beUm98jzor wyQ86SgzjcOwPut62GmMeoKojh6WFDOFb4G/aVECtIuA9GeMa05ptcEeAxhEflny1WRlksQy3KH acpBAFp8BgPQT5URCKPn0I3rH9GWLYqCcfw= X-Received: by 2002:a05:600c:1387:b0:45b:615c:cd2 with SMTP id 5b1f17b1804b1-45b85525da3mr110851615e9.8.1756829034843; Tue, 02 Sep 2025 09:03:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFK+olqO2XhantFiiWPufL3AewtUGVYNcTLfTrswnPMqjf60NR/9+6iN74eK0Z3ajSThHMrYA== X-Received: by 2002:a05:600c:1387:b0:45b:615c:cd2 with SMTP id 5b1f17b1804b1-45b85525da3mr110851255e9.8.1756829034431; Tue, 02 Sep 2025 09:03:54 -0700 (PDT) Received: from localhost ([31.111.84.207]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45b85090262sm153353985e9.17.2025.09.02.09.03.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Sep 2025 09:03:53 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCH 0/3] Core file Python API Date: Tue, 2 Sep 2025 17:03:48 +0100 Message-ID: X-Mailer: git-send-email 2.47.1 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: GRL2zw8wO4tSJsllwsKjLwuT67TMtbdIK9_czYj93Sk_1756829035 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true 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 This series extends the Python API to allow users to query the currently loaded core file, and to find out things about the core file. There's probably more features we could offer, but I think this is a reasonable starting point. All feedback welcome. Thanks, Andrew --- Andrew Burgess (3): gdb/python: introduce gdb.Corefile API gdb: make structured core file mappings processing global gdb/python: add Corefile.mapped_files method gdb/Makefile.in | 1 + gdb/NEWS | 21 + gdb/corelow.c | 225 ++++---- gdb/doc/python.texi | 110 ++++ gdb/gdbcore.h | 43 ++ gdb/observable.c | 1 + gdb/observable.h | 6 + gdb/python/py-corefile.c | 700 +++++++++++++++++++++++ gdb/python/py-inferior.c | 18 + gdb/python/python-internal.h | 8 + gdb/testsuite/gdb.python/py-corefile.c | 25 + gdb/testsuite/gdb.python/py-corefile.exp | 210 +++++++ gdb/testsuite/gdb.python/py-corefile.py | 144 +++++ 13 files changed, 1411 insertions(+), 101 deletions(-) create mode 100644 gdb/python/py-corefile.c create mode 100644 gdb/testsuite/gdb.python/py-corefile.c create mode 100644 gdb/testsuite/gdb.python/py-corefile.exp create mode 100644 gdb/testsuite/gdb.python/py-corefile.py base-commit: 7bdcd19cc6d8137ecdca83571946d6ffb7b4be26 -- 2.47.1