| Message ID | 20260316232042.368080-1-simon.marchi@polymtl.ca |
|---|---|
| Headers |
Return-Path: <gdb-patches-bounces~patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id C038B4BAD14B for <patchwork@sourceware.org>; Mon, 16 Mar 2026 23:21:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C038B4BAD14B 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 X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id BB43E4BBCDCA for <gdb-patches@sourceware.org>; 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 <simon.marchi@polymtl.ca> 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-Spam-Status: No, score=-3028.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_LOTSOFHASH, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS, SPF_NONE, TXREP, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org |
| Series |
Handle foreign type units in .debug_names
|
|
Message
Simon Marchi
March 16, 2026, 11:19 p.m. UTC
From: Simon Marchi <simon.marchi@polymtl.ca>
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