From patchwork Thu Mar 7 12:11:50 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: 31765 Received: (qmail 2101 invoked by alias); 7 Mar 2019 12:11:16 -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 2026 invoked by uid 89); 7 Mar 2019 12:11:11 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.3 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, 07 Mar 2019 12:11:10 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 8B542AFF0 for ; Thu, 7 Mar 2019 12:11:08 +0000 (UTC) Date: Thu, 7 Mar 2019 13:11:50 +0100 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [RFC][gdb/testsuite] Fix base address selection entry encoding in dw2-skip-prologue.S Message-ID: <20190307121149.GA14543@delia> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-IsSubscribed: yes Hi, A base address selection entry in a location list consist of two (constant or relocated) address offsets. The two offsets are the same size as an address on the target machine. The test-case gdb.dwarf2/dw2-skip-prologue.S encodes a base address selection entry using .4byte, which is incorrect for 8-byte pointer size. [ Which triggers an assert in dwz, see PR dwz/24172. ] Fix this by using PTRBYTE instead. Tested on x86_64-linux. Do we fix this type of errors in the testsuite? AFAICT, the invalid dwarf is not intentional. Thanks, - Tom [gdb/testsuite] Fix base address selection entry encoding in dw2-skip-prologue.S gdb/testsuite/ChangeLog: 2019-03-07 Tom de Vries * gdb.dwarf2/dw2-skip-prologue.S (.debug_loc): Fix base address selection entry encoding. --- gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S b/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S index cef6e6df12..a55699fdc6 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S +++ b/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S @@ -123,7 +123,7 @@ .section .debug_loc loclist: /* Reset the location list base address first. */ - .4byte -1, 0 + PTRBYTE -1, 0 PTRBYTE func_start, func_end .2byte 2f-1f