From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id +NYHAtiAQGE1QQAAWB0awg (envelope-from ) for ; Tue, 14 Sep 2021 07:00:40 -0400 Received: by simark.ca (Postfix, from userid 112) id E38711EE25; Tue, 14 Sep 2021 07:00:39 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.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 388E51EE14 for ; Tue, 14 Sep 2021 07:00:39 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 31D4E385843B for ; Tue, 14 Sep 2021 11:00:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 31D4E385843B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1631617238; bh=3fxBxnSl0FSM4/d7svF9FWowJdC7zcN3whfU8jDE928=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=Il0Th1dJ8QRUALkZwffGehKUhXrGdWVRHJK6ZSbCvFNkL79N56YsjK62qZsDOfHIS oRovGa2BW6ILTaX4fEsIwrQQrD5eBlcbInG1pibxeMYurz0wWRTLfxVZS92qjzXN0Y Y+Plj4au4Hq23zsv7qGmYKyLWxNUdkQrlo2g+rck= Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 529023858402 for ; Tue, 14 Sep 2021 11:00:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 529023858402 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (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 6A36A1FDE3 for ; Tue, 14 Sep 2021 11:00:19 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (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 imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 556F313D3F for ; Tue, 14 Sep 2021 11:00:19 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id MIeyE8OAQGEWeAAAMHmgww (envelope-from ) for ; Tue, 14 Sep 2021 11:00:19 +0000 Date: Tue, 14 Sep 2021 13:00:17 +0200 To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Generate .debug_aranges in gdb.dwarf2/locexpr-data-member-location.exp Message-ID: <20210914110015.GA13980@delia.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) 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" Hi, When running test-case gdb.dwarf2/locexpr-data-member-location.exp with target board cc-with-debug-names, all tests pass but we run into PR28261: ... (gdb) run ^M Starting program: locexpr-data-member-location ^M warning: Section .debug_names in locexpr-data-member-location-lib.so has \ abbreviation_table of size 1 vs. written as 37, ignoring .debug_names.^M ... Using a patch that fixes PR28261, the warning is gone, but we run into: ... FAIL: gdb.dwarf2/locexpr-data-member-location.exp: step into foo ... This is due a missing .debug_aranges contribution for the CU declared in gdb.dwarf2/locexpr-data-member-location.exp. Fix this by adding the missing .debug_aranges contribution. Tested on x86_64-linux. Committed to trunk. Thanks, - Tom [gdb/testsuite] Generate .debug_aranges in gdb.dwarf2/locexpr-data-member-location.exp --- gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp b/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp index 1f70e6a34bd..1c366521808 100644 --- a/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp +++ b/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp @@ -144,7 +144,7 @@ Dwarf::assemble ${asm_file} { get_func_info foo $flags get_func_info bar $flags - cu {} { + cu { label cu_label } { DW_TAG_compile_unit { {DW_AT_language @DW_LANG_C_plus_plus} {name ${::srcfile}} @@ -294,6 +294,11 @@ Dwarf::assemble ${asm_file} { {DW_LNE_end_sequence} } } + + aranges {} cu_label { + arange {} $foo_start $foo_end + arange {} $bar_start $bar_end + } } # Compile the shared object again, but this time include / use the