From patchwork Mon Apr 7 17:51:59 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 110000 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D5D033860769 for ; Mon, 7 Apr 2025 17:59:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D5D033860769 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=polymtl.ca header.i=@polymtl.ca header.a=rsa-sha256 header.s=default header.b=HiZa0ZYw 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 EC034385C6EC for ; Mon, 7 Apr 2025 17:58:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EC034385C6EC 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 EC034385C6EC 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=1744048702; cv=none; b=BQTpBVG5j3ToLq/r53ItGTwAr/zBoeSaJoEwgmhX438QkGvMsuHYKdyQ35BNsCmOr9DEpTwG/EOJwRg8/WCUOZovbPFaUMDQMCgY28EltCJOJm4NPCm1IiZ827rLKlgalN7HlLIUp91DS1MRNkTKEb0czX1PZuZbGWxZ2I7ywVA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1744048702; c=relaxed/simple; bh=qob/h6pf0mkgxNMgDjHJw3ETgcMbIb8av5UIjGmKeC0=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=DhLxApAt7FQ3eF5xCN6UCfcY74Lkw1UTKb/V+n0N0OGi0feZkn2IRyHruQFza4CjgzFJWocUi4tWPNNuEGBu9vnIivPvUTRcvuGZ4FRZCT9qZ6XgeIYDUYkbmUzM+qiF6JbHnW2SS6YMFaqyYKBCYABfoSyhcCh27qnh0uw+1e8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EC034385C6EC 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 537HwG90220466 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 7 Apr 2025 13:58:21 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 537HwG90220466 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=default; t=1744048701; bh=OJ4o/H8lIz7v6Vs71ckh88+hYWpMxT+gIj2XfZ5G6oM=; h=From:To:Cc:Subject:Date:In-Reply-To:From; b=HiZa0ZYw4wSrL3RJUA4T1SK+lPhaunHCFyVOnTijdriEHAd3TahisROlMFUrma1e9 +JTFYrlxAa6vhf3lkIOP7LZila49BOJJQMvV0QeeYL9+vHwGtLSueKefGSW9yiDqw3 +8MvD9Fi0Q+VXt3XGJTQo31C30arXBNSW8FJ4ZgQ= Received: by simark.ca (Postfix, from userid 112) id C1ED71E126; Mon, 7 Apr 2025 13:52:51 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-Spam-Level: X-Spam-Status: No, score=-3187.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 Received: from simark.localdomain (modemcable238.237-201-24.mc.videotron.ca [24.201.237.238]) (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 ESMTPSA id C48611E0C3; Mon, 7 Apr 2025 13:52:48 -0400 (EDT) From: simon.marchi@polymtl.ca To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 2/4] gdb/testsuite/dwarf: add support to generate DWARF 5 split compile units Date: Mon, 7 Apr 2025 13:51:59 -0400 Message-ID: <20250407175247.3312551-3-simon.marchi@polymtl.ca> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250407175247.3312551-1-simon.marchi@polymtl.ca> References: <20250407175247.3312551-1-simon.marchi@polymtl.ca> MIME-Version: 1.0 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Mon, 7 Apr 2025 17:58:16 +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~patchwork=sourceware.org@sourceware.org From: Simon Marchi Add support to the DWARF assembler to generate DWARF 5 split compile units. The assembler knows how to generate DWARF < 5 split compile units (fission), DWARF 5 compile units, but not DWARF 5 split compile units. What's missing is: - using the right unit type in the header: skeleton for the unit in the main file and split_compile for the unit in the DWO file - have a way for the caller to specify the DWO ID that will end up in the unit header Add a dwo_id parameter to the cu proc. In addition to specifying the DWO ID, the presence of this parameter tells the assembler to use the skeleton or split_compile unit type. This is used in a subsequent patch. Change-Id: I05d9b189a0843ea6c2771b1d5e5a91762426dea9 --- gdb/testsuite/lib/dwarf.exp | 48 ++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/lib/dwarf.exp b/gdb/testsuite/lib/dwarf.exp index 7dcf13f2ce7b..308ab852bd15 100644 --- a/gdb/testsuite/lib/dwarf.exp +++ b/gdb/testsuite/lib/dwarf.exp @@ -1441,6 +1441,17 @@ namespace eval Dwarf { # default = default # fission 0|1 - boolean indicating if generating Fission debug info # default = 0 + # dwo_id - The value to use as the dwo_id field of skeleton and + # split_compile unit headers. May only be used with DWARF + # version 5. + # + # If a dwo_id value is specified (is non-zero), this unit is + # assumed to be part of a skeleton/split_unit pair. The unit + # type will be chosen according to the `fission` value. + # + # When using DWARF version 5 and fission is non-zero, it is + # mandatory to provide a non-zero dwo_id value. + # default = 0 # label