From patchwork Thu May 9 10:25:45 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: 32618 Received: (qmail 40260 invoked by alias); 9 May 2019 10:25:51 -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 40250 invoked by uid 89); 9 May 2019 10:25:51 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.4 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; Thu, 09 May 2019 10:25:49 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 80F32ABA1 for ; Thu, 9 May 2019 10:25:47 +0000 (UTC) Date: Thu, 9 May 2019 12:25:45 +0200 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Fix gdb.arch/amd64-tailcall-self.S Message-ID: <20190509102544.GA14152@delia> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-IsSubscribed: yes Hi, The test-case gdb.arch/amd64-tailcall-self.exp fails here: ... if ![runto b] { return -1 } ... like: ... (gdb) file build/gdb/testsuite/outputs/gdb.arch/amd64-tailcall-self/\ amd64-tailcall-self Reading symbols from build/gdb/testsuite/outputs/gdb.arch/\ amd64-tailcall-self/amd64-tailcall-self... Dwarf Error: Cannot find DIE at 0x1f5 referenced from DIE at 0x107 [in \ module build/gdb/testsuite/outputs/gdb.arch/amd64-tailcall-self/\ amd64-tailcall-self] ... The problem is that in amd64-tailcall-self.S, CU-relative references are assigned .debug_info section relative values. [ This is similar to the problem fixed by "Fix gdb.arch/amd64-entry-value-paramref.S". ] Fix this by assigning CU-relative references instead. Tested on x86_64-linux. Committed to trunk. Thanks, - Tom [gdb/testsuite] Fix gdb.arch/amd64-tailcall-self.S gdb/testsuite/ChangeLog: 2019-05-09 Tom de Vries * gdb.arch/amd64-tailcall-self.S: Make DW_FORM_ref4 references CU-relative. --- gdb/testsuite/gdb.arch/amd64-tailcall-self.S | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/gdb/testsuite/gdb.arch/amd64-tailcall-self.S b/gdb/testsuite/gdb.arch/amd64-tailcall-self.S index de5979598d..0dce7e21d5 100644 --- a/gdb/testsuite/gdb.arch/amd64-tailcall-self.S +++ b/gdb/testsuite/gdb.arch/amd64-tailcall-self.S @@ -209,7 +209,7 @@ die29: .byte 0x1 # DW_AT_decl_file (amd64-tailcall-self.c) .byte 0x7 # DW_AT_decl_line # DW_AT_prototyped - .long die6b # DW_AT_type + .long die6b - .Ldebug_info0 # DW_AT_type .quad .LFB1 # DW_AT_low_pc .quad .LFE1-.LFB1 # DW_AT_high_pc .uleb128 0x1 # DW_AT_frame_base @@ -219,7 +219,7 @@ die29: .ascii "q\0" # DW_AT_name .byte 0x1 # DW_AT_decl_file (amd64-tailcall-self.c) .byte 0x7 # DW_AT_decl_line - .long die6b # DW_AT_type + .long die6b - .Ldebug_info0 # DW_AT_type .uleb128 0x1 # DW_AT_location .byte 0x55 # DW_OP_reg5 .byte 0 # end of children of DIE 0x40 @@ -244,7 +244,7 @@ die72: .ascii "q\0" # DW_AT_name .byte 0x1 # DW_AT_decl_file (amd64-tailcall-self.c) .byte 0xb # DW_AT_decl_line - .long die6b # DW_AT_type + .long die6b - .Ldebug_info0 # DW_AT_type .uleb128 0x4 # DW_AT_location .byte 0xf3 # DW_OP_GNU_entry_value .uleb128 0x1 @@ -253,11 +253,11 @@ die72: .uleb128 0x7 # (DIE () DW_TAG_GNU_call_site) .quad .Lfirsttailcall # DW_AT_low_pc # DW_AT_GNU_tail_call - .long die72 # DW_AT_abstract_origin + .long die72 - .Ldebug_info0 # DW_AT_abstract_origin .uleb128 0x7 # (DIE (0x9b) DW_TAG_GNU_call_site) .quad .LVL2 # DW_AT_low_pc # DW_AT_GNU_tail_call - .long die29 # DW_AT_abstract_origin + .long die29 - .Ldebug_info0 # DW_AT_abstract_origin .byte 0 # end of children of DIE 0x72 .uleb128 0x8 # (DIE (0xa9) DW_TAG_subprogram) # DW_AT_external @@ -265,7 +265,7 @@ die72: .byte 0x1 # DW_AT_decl_file (amd64-tailcall-self.c) .byte 0x14 # DW_AT_decl_line # DW_AT_prototyped - .long die6b # DW_AT_type + .long die6b - .Ldebug_info0 # DW_AT_type .quad .LFB3 # DW_AT_low_pc .quad .LFE3-.LFB3 # DW_AT_high_pc .uleb128 0x1 # DW_AT_frame_base @@ -275,17 +275,17 @@ die72: .long .LASF1 # DW_AT_name: "argc" .byte 0x1 # DW_AT_decl_file (amd64-tailcall-self.c) .byte 0x14 # DW_AT_decl_line - .long die6b # DW_AT_type + .long die6b - .Ldebug_info0 # DW_AT_type .long .LLST0 # DW_AT_location .uleb128 0x9 # (DIE (0xd9) DW_TAG_formal_parameter) .long .LASF2 # DW_AT_name: "argv" .byte 0x1 # DW_AT_decl_file (amd64-tailcall-self.c) .byte 0x14 # DW_AT_decl_line - .long diefe # DW_AT_type + .long diefe - .Ldebug_info0 # DW_AT_type .long .LLST1 # DW_AT_location .uleb128 0xa # (DIE (0xe8) DW_TAG_GNU_call_site) .quad .LVL4 # DW_AT_low_pc - .long die72 # DW_AT_abstract_origin + .long die72 - .Ldebug_info0 # DW_AT_abstract_origin .uleb128 0xb # (DIE (0xf5) DW_TAG_GNU_call_site_parameter) .uleb128 0x1 # DW_AT_location .byte 0x55 # DW_OP_reg5 @@ -298,11 +298,11 @@ die72: diefe: .uleb128 0xc # (DIE (0xfe) DW_TAG_pointer_type) .byte 0x8 # DW_AT_byte_size - .long die104 # DW_AT_type + .long die104 - .Ldebug_info0 # DW_AT_type die104: .uleb128 0xc # (DIE (0x104) DW_TAG_pointer_type) .byte 0x8 # DW_AT_byte_size - .long die10a # DW_AT_type + .long die10a - .Ldebug_info0 # DW_AT_type die10a: .uleb128 0xd # (DIE (0x10a) DW_TAG_base_type) .byte 0x1 # DW_AT_byte_size @@ -312,7 +312,7 @@ die10a: .ascii "i\0" # DW_AT_name .byte 0x1 # DW_AT_decl_file (amd64-tailcall-self.c) .byte 0x5 # DW_AT_decl_line - .long die6b # DW_AT_type + .long die6b - .Ldebug_info0 # DW_AT_type # DW_AT_external .uleb128 0x9 # DW_AT_location .byte 0x3 # DW_OP_addr