From patchwork Mon Jun 24 10:22:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 33339 Received: (qmail 73661 invoked by alias); 24 Jun 2019 10:22:38 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 73652 invoked by uid 89); 24 Jun 2019 10:22:38 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 24 Jun 2019 10:22:37 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 3EBF2AC98; Mon, 24 Jun 2019 10:22:35 +0000 (UTC) Date: Mon, 24 Jun 2019 12:22:32 +0200 From: Tom de Vries To: gdb-patches@sourceware.org Cc: Keith Seitz Subject: [committed][gdb/testsuite] Fix inter-cu refs in inlined_subroutine-inheritance.exp Message-ID: <20190624102231.GA26718@delia> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-IsSubscribed: yes Hi, When running gdb.dwarf2/inlined_subroutine-inheritance.exp with board cc-with-dwz, we run into: ... dwz: inlined_subroutine-inheritance: Couldn't find DIE referenced by \ DW_AT_abstract_origin ... The problem is that the DW_AT_abstract_origin attributes refer to DIEs in other CUs, while the references are encoded using the cu-relative encoding DW_FORM_ref4. Fix this by forcing the references to use DW_FORM_ref_addr. Tested on x86_64-linux. Tested with commit c24bdb023c "Introduce dwarf2_cu::get_builder" reverted, and verified that the test-case fails in the same way before and after this patch. Committed to trunk. Thanks, - Tom [gdb/testsuite] Fix inter-cu refs in inlined_subroutine-inheritance.exp gdb/testsuite/ChangeLog: 2019-06-24 Tom de Vries * gdb.dwarf2/inlined_subroutine-inheritance.exp: --- gdb/testsuite/gdb.dwarf2/inlined_subroutine-inheritance.exp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gdb/testsuite/gdb.dwarf2/inlined_subroutine-inheritance.exp b/gdb/testsuite/gdb.dwarf2/inlined_subroutine-inheritance.exp index 19b859492a..b51063c018 100644 --- a/gdb/testsuite/gdb.dwarf2/inlined_subroutine-inheritance.exp +++ b/gdb/testsuite/gdb.dwarf2/inlined_subroutine-inheritance.exp @@ -44,17 +44,17 @@ Dwarf::assemble $asm_file { {name ""} } { D72f8: subprogram { - {abstract_origin :$D272519} + {abstract_origin %$D272519} {low_pc 0xb9e20 addr} {high_pc 0x1f5 data4} } { D736e: inlined_subroutine { - {abstract_origin :$D26b227} + {abstract_origin %$D26b227} {low_pc 0xb9efc addr} {high_pc 0xc data4} } { formal_parameter { - {abstract_origin :$D274c42} + {abstract_origin %$D274c42} } } }