From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id hY7sI0D8KGFVWgAAWB0awg (envelope-from ) for ; Fri, 27 Aug 2021 10:52:48 -0400 Received: by simark.ca (Postfix, from userid 112) id 8320C1EE1B; Fri, 27 Aug 2021 10:52:48 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from 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 RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id B7C801EDEE for ; Fri, 27 Aug 2021 10:52:47 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0CD41385AC2E for ; Fri, 27 Aug 2021 14:52:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0CD41385AC2E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1630075967; bh=P6KFHG5LkbkZqrMfVIvQQ0xtQmNydnB9jgl6gUYgBDA=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=HAaiKlqb0tI0Azj9MxaotJB7uBULRyIXfTu7KsHdsO0Xtj+F6KVD07rwLmuX4eaR1 1ymvrbCqWo76WrVnKuzbVBl+nzMIUP3sLwOAP5UKZLiIIvtDFSpR6/s9c6cPCXFyUM UKNVL3mmsZRzLfRLQFyQRU1lJJfvoMu8zoGZyzok= Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 4780D3858C60 for ; Fri, 27 Aug 2021 14:52:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4780D3858C60 Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 6258B1FD45; Fri, 27 Aug 2021 14:52:18 +0000 (UTC) Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap1.suse-dmz.suse.de (Postfix) with ESMTPS id 41CCF13946; Fri, 27 Aug 2021 14:52:18 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap1.suse-dmz.suse.de with ESMTPSA id NScEDyL8KGGrdgAAGKfGzw (envelope-from ); Fri, 27 Aug 2021 14:52:18 +0000 Subject: Re: [PATCH][gdb/testsuite] Generate .debug_aranges entry for dummy CU To: Tom Tromey , Tom de Vries via Gdb-patches References: <20210826115816.GA22826@delia> <875yvrovgk.fsf@tromey.com> Message-ID: Date: Fri, 27 Aug 2021 16:52:17 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <875yvrovgk.fsf@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Tom de Vries via Gdb-patches Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 8/27/21 3:42 PM, Tom Tromey wrote: >>>>>> "Tom" == Tom de Vries via Gdb-patches writes: > > Tom> A best practise for DWARF [1] is to generate .debug_aranges entries for CUs > Tom> even if they have no address range. > > Tom> Generate .debug_arange entries for the dummy CUs added by the DWARF assembler. > > Tom> Tested on x86_64-linux. > > Tom> [1] http://wiki.dwarfstd.org/index.php?title=Best_Practices > > Tom> Any comments? > > Tom> + declare_labels dummy_cu > [ FWIW, with the committed "[gdb/testsuite] Add label option to proc cu" there's also no longer a need for declare_labels. ] > If there are two dummy CUs, won't the labels clash? No, due to the way cu labels are defined in "[gdb/testsuite] Add label option to proc cu". So, for say test-case gdb.dwarf2/dw2-ranges-base.exp we have these references: ... $ grep "Offset" outputs/gdb.dwarf2/dw2-ranges-base/dw2-ranges-base-dw.S .4byte .Lcu0_begin /* Offset into .debug_info */ .4byte .Lcu1_begin /* Offset into .debug_info */ .4byte .Lcu2_begin /* Offset into .debug_info */ ... where .Lcu0_begin is a dummy CU, .Lcu1_begin is the one specified by the .exp file and .Lcu2_begin is another dummy CU. Thanks, - Tom