From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id CXAVAJpxtWn8NSkAWB0awg (envelope-from ) for ; Sat, 14 Mar 2026 10:32:58 -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=Mnbfdr1L; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id DFACC1E0DD; Sat, 14 Mar 2026 10:32:57 -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 596161E08D for ; Sat, 14 Mar 2026 10:32:57 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id BB4244C31899 for ; Sat, 14 Mar 2026 14:32:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BB4244C31899 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=Mnbfdr1L Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 6C17E4B35888 for ; Sat, 14 Mar 2026 14:32:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6C17E4B35888 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 6C17E4B35888 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1773498750; cv=none; b=A/WwZK6Y+gWTi0ZjpVzW5qtdgIJWowlDskp7BsjCMv8RGiUYG7xujnh5mristiL3UpvUhxmcBKxnjSs7L89YmfCZkVBRkwzc9rIFdgshzKkh/OjAK3IvORh9y0EO/B9m8Q/ZdxIjE4ygfeviGHNWeitzHH1CpjUVhRICT0VrKI0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1773498750; c=relaxed/simple; bh=8xm+RSVGbiM+gFACkT7D9OaypQOX18yBU17QYFPQrHg=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=k1u+s321rle6I0qrbxXVYvpRRzklInmmyF5bqt/P0huDp6okuWWMCcqCe038Pjjb2weQDZoP7hBTuTwWO/2feIjG8fUCFVeTxdPoXURljpT/gWUSpIDbfLiZ7nTyi4n8nlyIHU07Guchxo6kGfhNn/2kAXKnqNzyzrars9+nC8Y= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6C17E4B35888 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773498750; 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=OSFwfvkO+YNvX5/9WlkvATD4aRoW6qcLZfVyZVS0wws=; b=Mnbfdr1LrQiFYaPeHU4htnyTmhi8098qTFkEwlI83i5NwlNrjk20Sk18x03JTV6qZtlhoI 5oCTiGWWxfkUk06/fhZLpEFknn9MetUnPAurEDjl/ktixq1LrowQ3upd+2gx7jmV9gCGZ9 T2oyTcbw+kEpgIZk5KE4Zd9sNRPnvtc= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-516-qS2clFy5N-WrQDeCYepKjQ-1; Sat, 14 Mar 2026 10:32:29 -0400 X-MC-Unique: qS2clFy5N-WrQDeCYepKjQ-1 X-Mimecast-MFC-AGG-ID: qS2clFy5N-WrQDeCYepKjQ_1773498748 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-4853ac455b2so28232195e9.1 for ; Sat, 14 Mar 2026 07:32:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773498747; x=1774103547; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=OSFwfvkO+YNvX5/9WlkvATD4aRoW6qcLZfVyZVS0wws=; b=U9DcTz05LDnM4IwCuQG2R4VMS2eBFkoztBdbizVqIw+MVDjN5EHLG4QXVHjgLfwer0 cMzUQqXnWZ81tdZC4GgoP5jgOsWC6rQfJR3y2HYvfYDFkLj2UAj7uknUFPd0Bvs9MieN M6l/hyQdXRrJqkj+LxG0hu6+e/E1e4l4I77a9UR9EFr44RBOoyl1Zle8pABRyfWiuXwZ j7cjU7wVHAXLZZciwNTtuXMspSd+kovYQzkXRa4MlSqQOt/gNle8EE/W1Euro7vK3x1q yi8bDBDIPTlZ/V+6BYUyh4wD2cxC9/Eukfd4yZ3C2MVWyBvbqisJwiJkF3U/cH46IuN/ 5/DA== X-Gm-Message-State: AOJu0YytTlnQT88+JNpjgk1nv5kRWHui/aK9+1oc5Q5eeCmSHFYXgpSO ZJTR/iPg2L4OScSZUjsMZ9t7OGycr0nI+bMqHyymZjXKE2URX2P8KL8FGk4sJrVz4zvUY5nPo7+ OKOA1i9RU86GRnEcFUGlfv8hwlsw+ISNh9d3yD3CDcLw/amJ3WWrh1C0JYhypsWAn9vZ37nT6+f y7LlpdfvNUedeoxlQyZU7dnIJX4zaZwte5uCt/9PdXQlx0RxA= X-Gm-Gg: ATEYQzyBiZdxGWaxxY5AOsur9y26eH75cfS87cHjVrTerQwbH0Mw7LKbBqmJ9xw93bH kayp/M7mSdQPWn6vRMUzljurGKhbZgwX6pOtO5qVTEQK0f77/TWigDWM3s0AyEKs8cNHn34vJWm C6oO78nxuAz/88RvKodY1QyrNEKCF9eGhwK5VlhFGRyf8eBHFtoNKr8f0LpQYqowe6/40kCyQt7 Q848oGMCYBeaD6g/oUz/etY4QqzvQi+Ibmy+gk17guVeKEVykWFHwoARV+2O53zrDhTaJEstVCz N7T8KFJf+Qw8xYDU10VhxTK7jcDEen9oZjgus/U4ANsQSrbA7bIumMNije2/ZIoE7rt6bTbkPUC raqiNyrfLK//u/MYiUaL9E1d16/GG1puCLhGsNrTjS12GIg== X-Received: by 2002:a05:600c:1d0e:b0:47e:e076:c7a5 with SMTP id 5b1f17b1804b1-485566ea474mr124540975e9.11.1773498746904; Sat, 14 Mar 2026 07:32:26 -0700 (PDT) X-Received: by 2002:a05:600c:1d0e:b0:47e:e076:c7a5 with SMTP id 5b1f17b1804b1-485566ea474mr124540435e9.11.1773498746377; Sat, 14 Mar 2026 07:32:26 -0700 (PDT) Received: from localhost (92.40.185.182.threembb.co.uk. [92.40.185.182]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4854b5e912fsm753884965e9.2.2026.03.14.07.32.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Mar 2026 07:32:25 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCH 0/5] Improved support for core files with missing NT_FILE note Date: Sat, 14 Mar 2026 14:32:17 +0000 Message-Id: X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: -4YuEltqmYqE8wj915vIwjw8v89xfJsyXcvMVyIpHAQ_1773498748 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 improves GDB's support for core files without an NT_FILE note. When this note is missing GDB is currently unable to associate a build-id with any of the shared libraries that loaded as the core file is opened. As a result GDB might load the wrong shared library if a local library happens to have the same name (e.g. is a different version of the same library), and GDB will not perform a build-id based lookup either locally, or through debuginfod, for the missing shared library. Patches #1 and #2 rework some existing tests. This gets these tests into a state where they can be reused for testing the fixes that come later in the series. Patches #3 and #4 are minor refactoring patches removing some code that will make the later patch in this series harder. Patch #5 is the actual fix. After this, on GNU/Linux, GDB will be able to associate a build-id with a shared library, even if the NT_FILE note is missing from a core file. Thanks, Andrew --- Andrew Burgess (5): gdb/testsuite: improve corefile-no-threads.py script gdb/testsuite: restructure gdb.base/corefile-buildid.exp gdb: remove 'num' argument from gdbarch_read_core_file_mappings callback gdb: remove pre-loop callback from gdbarch_read_core_file_mappings gdb/linux: handle missing NT_FILE note when opening core files gdb/arch-utils.c | 1 - gdb/arch-utils.h | 1 - gdb/corelow.c | 68 ++-- gdb/doc/python.texi | 10 +- gdb/gdbarch-gen.c | 4 +- gdb/gdbarch-gen.h | 4 +- gdb/gdbarch.h | 8 +- gdb/gdbarch_components.py | 1 - gdb/gdbcore.h | 28 +- gdb/linux-tdep.c | 342 +++++++++++------- gdb/testsuite/gdb.base/corefile-buildid.exp | 290 +++++++++++---- .../gdb.base/corefile-no-threads.exp | 10 +- gdb/testsuite/gdb.base/corefile-no-threads.py | 47 ++- gdb/testsuite/gdb.python/py-corefile.py | 4 + 14 files changed, 555 insertions(+), 263 deletions(-) base-commit: e4fe38115fea0a9f357527959893f18ca8d51a03 -- 2.25.4