From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id GX4eKJCQuGmykywAWB0awg (envelope-from ) for ; Mon, 16 Mar 2026 19:21:52 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=polymtl.ca header.i=@polymtl.ca header.a=rsa-sha256 header.s=oct2025 header.b=lgbLQxAj; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 9DB9E1E0C3; Mon, 16 Mar 2026 19:21:52 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, 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 BC4B91E08C for ; Mon, 16 Mar 2026 19:21:51 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 2DF1A4CCCA05 for ; Mon, 16 Mar 2026 23:21:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2DF1A4CCCA05 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=polymtl.ca header.i=@polymtl.ca header.a=rsa-sha256 header.s=oct2025 header.b=lgbLQxAj Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id BB43E4BBCDCA for ; Mon, 16 Mar 2026 23:20:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BB43E4BBCDCA Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=polymtl.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=polymtl.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org BB43E4BBCDCA Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=132.207.4.11 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1773703255; cv=none; b=GRTqrkpZMYe/JOEzxuTEG4Uf5PLfZ4Ry20gYGEYxXNqe7lwh7dzXXp+Lf8o2BTHzrxyM3dmfM4+8hhVZKUWznpOlTQQov3ZHAAIgA9A+XGfbP4c5bza4kHAyTPkou7V5z5Ci/q887S/x3zDQIa5MZxxx2fWfqh5RXuYy+T78cTE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1773703255; c=relaxed/simple; bh=H4sMLNICKDqH81cMEfBu5A1aHBwZTRZZthE3U+2QT+I=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Jro0DKd3up7/bjw1fAjkx3jwM8kh2LSu272XijScii6LqQ7ApojyW74EFg3MCjHXTfnhn/rcTs9Whk7mtRvcKIeSKePD+AySSGmc/j2hGdYWrQ3zdNB/4g95hb036isXlN9gy1VwePUNBjMz/QZKzAzIy8HSCSx7HY0fWQkESlw= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BB43E4BBCDCA Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 62GNKnt4238290 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 16 Mar 2026 19:20:54 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 62GNKnt4238290 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=oct2025; t=1773703254; bh=Bo7utG8wbsuGjjWVn7dJqk2ypMMCyD7YsTawf1jPx1Q=; h=From:To:Cc:Subject:Date:From; b=lgbLQxAjrow1j55nEcrZEdG289j3qXG+AwhzUtfc3HgK832INqERKim6wUKq2zVQ+ 5P/IbTNx8UVLqr+u2QKB9Q9PzxpNFqle9YUsGlUKXfhl8RK2/BYTxbwtrMpXNrdCfZ Stp3O5LcD2v1JKiG9iHKkbZ3g6fYZ+sKomF5/Uj3INGWpEWLQwI5j359l8v0+oI7dV WFnZroZ6Jt6UmOPuZIGZMrUMGYPDWsBAJFBbppdCmBA5mno5WdIcvyO3OLe2/QxsOv /4WX5EMRDBAPK94iC9EMkIL7U4fDlyFcH+3sREUnjAIjBMVXZ7Xop0llP9ek6hz3J0 RBFVfwpackQ8A== Received: by simark.ca (Postfix) id 78A791E08C; Mon, 16 Mar 2026 19:20:48 -0400 (EDT) From: simon.marchi@polymtl.ca To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 0/8] Handle foreign type units in .debug_names Date: Mon, 16 Mar 2026 19:19:18 -0400 Message-ID: <20260316232042.368080-1-simon.marchi@polymtl.ca> X-Mailer: git-send-email 2.53.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Mon, 16 Mar 2026 23:20:49 +0000 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: Simon Marchi Foreign type units is a fancy name for type units in .dwo files. As we stand, in the presence of foreign type units, we produce bogus indexes (both .gdb_index and .debug_names). So I think the minimum would be to refuse creating indexes if there are foreign type units. However, this series adds support for writing them to .debug_name and reading them back. For .gdb_index, the series just makes GDB refuse to create an index in that case. Note that this series depends on the enumerate series here: https://inbox.sourceware.org/gdb-patches/20260220202002.860008-1-simon.marchi@efficios.com/T/#m75d30311589e79b52dcbdd840f8843ffa207000f Simon Marchi (8): gdb: refuse to produce .gdb_index when skeletonless type units are present gdb/dwarf: move dwo_unit and dwo_file to read.h gdb/dwarf: move dwarf2_cu::section to cu.c gdb/dwarf: add dwo_file::find_tus gdb/dwarf: generate foreign type units in .debug_names gdb/dwarf: add debug output in read-debug-names.c gdb/dwarf: add more context to complaints in mapped_debug_names_reader::scan_one_entry gdb/dwarf: read foreign type units gdb/doc/gdb.texinfo | 6 + gdb/dwarf2/cu.c | 11 + gdb/dwarf2/index-write.c | 174 ++++++++- gdb/dwarf2/read-debug-names.c | 355 +++++++++++++++--- gdb/dwarf2/read.c | 349 ++++++++--------- gdb/dwarf2/read.h | 208 +++++++++- gdb/dwarf2/types.h | 2 + ...dwarf5-fission-debug-types-debug-names.exp | 29 ++ .../gdb.dwarf2/gdb-index-skeletonless-tu.c | 23 ++ .../gdb.dwarf2/gdb-index-skeletonless-tu.exp | 103 +++++ gdbsupport/common-utils.h | 12 + 11 files changed, 1032 insertions(+), 240 deletions(-) create mode 100644 gdb/testsuite/boards/dwarf5-fission-debug-types-debug-names.exp create mode 100644 gdb/testsuite/gdb.dwarf2/gdb-index-skeletonless-tu.c create mode 100644 gdb/testsuite/gdb.dwarf2/gdb-index-skeletonless-tu.exp base-commit: 9cc83ec0ce9b4b75e8cd2b0c46f23d4cbf4b2f2b prerequisite-patch-id: 44023c5aa2f90e676c8b6f2479de04cf3ccb86fa prerequisite-patch-id: acbee56e54b4f2ebd7a2b321eae58521699d66a3 prerequisite-patch-id: 1fe50e2f79d2cbbb73a5aff3b2f87506466443c2 -- 2.53.0