From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id JSq3E4lgDmm6TSoAWB0awg (envelope-from ) for ; Fri, 07 Nov 2025 16:11:37 -0500 Received: by simark.ca (Postfix, from userid 112) id 3E4591E0BC; Fri, 07 Nov 2025 16:11:37 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, 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 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 BBCF51E04C for ; Fri, 07 Nov 2025 16:11:36 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 41A7C3858C62 for ; Fri, 7 Nov 2025 21:11:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 41A7C3858C62 Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 9AD673858D20 for ; Fri, 7 Nov 2025 21:10:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9AD673858D20 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=efficios.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=efficios.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9AD673858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1762549843; cv=none; b=uulPhjRLpXmFey/Ux4sgIVGRvNyl1y5KrEdYgipuNJj8NH5rwC5a2qFyaOdCqSNAazekmxuCq7i08/Q4NbXuyie6f9hbvYxWz+KHAjx5KeD7Whua8kt3JNT59s729lRDLwK1aMLtCCvqVcrq2YL+IUkcW/o/BXo29cL6fjsjmpY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1762549843; c=relaxed/simple; bh=H6Z1MPta9RG+iKtpv9vILl92nelA3bw0SUdchfOWTzs=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=FP+HyUVhy58HWuLKbk/QLZwShxGb6XzKLld2xQTv4y7iy1dI42Y+Zkmt5K1ok8bqiRbK9qdXcuRhZeED38as//7IFG7U3maFaqlKVvVsLJxjHlBgxwEVccoHv3GCgKEdMTI01rot/XqYvmkKHSK3faLaUZ0JuFzeO7bAOkPweck= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9AD673858D20 Received: by simark.ca (Postfix) id AF5B41E04C; Fri, 07 Nov 2025 16:10:42 -0500 (EST) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 0/6] Type unit + split DWARF fixes (PR 33307) Date: Fri, 7 Nov 2025 16:10:11 -0500 Message-ID: <20251107211041.520697-1-simon.marchi@efficios.com> X-Mailer: git-send-email 2.51.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 fixes a regression that I introduced a few months ago, causing a crash in very specific circumstances: type unit in a .dwo file + stub in the main file + gdb index. Luckily, this was caught by test gdb.dwarf2/fission-reread.exp when ran with the cc-with-gdb-index board. Patches 1-3 are improvements to the testsuite DWARF assembler, allowing to generate better type units and split DWARF tests. Patch 4 fixes the reported crash. Patch 5 fixes another case of the same crash, for which I provide a test / reproducer. Patch 6 is a trivial cleanup. Simon Marchi (6): gdb/testsuite/dwarf: use single abbrev table in .dwo files gdb/testsuite/dwarf: convert _section proc to use parse_options gdb/testsuite/dwarf: emit type unit sections as COMDAT gdb/dwarf: when in dwarf2_cu, read addr_size from dwarf2_cu::header gdb/dwarf: store addr/offset/ref_addr sizes in dwarf2_per_cu gdb/dwarf: use dwarf2_per_cu::ref_addr_size in one spot gdb/dwarf2/cu.c | 7 +- gdb/dwarf2/read.c | 71 ++------ gdb/dwarf2/read.h | 56 ++++-- .../gdb.dwarf2/fission-type-unit-locexpr.c | 25 +++ .../gdb.dwarf2/fission-type-unit-locexpr.exp | 161 ++++++++++++++++++ .../gdb.dwarf2/fission-with-type-unit.exp | 29 ++-- gdb/testsuite/lib/dwarf.exp | 132 +++++++++++--- 7 files changed, 362 insertions(+), 119 deletions(-) create mode 100644 gdb/testsuite/gdb.dwarf2/fission-type-unit-locexpr.c create mode 100644 gdb/testsuite/gdb.dwarf2/fission-type-unit-locexpr.exp base-commit: 767c92a13e92d3c34b8ed6f3b6f1bf17eca57cbd -- 2.51.2