From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 45415 invoked by alias); 23 Apr 2019 14:21:17 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 45405 invoked by uid 89); 23 Apr 2019 14:21:17 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.6 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; Tue, 23 Apr 2019 14:21:16 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 60A93ACF8 for ; Tue, 23 Apr 2019 14:21:14 +0000 (UTC) Subject: [PING][RFC][gdb/testsuite] Fix base address selection entry encoding in dw2-skip-prologue.S From: Tom de Vries To: gdb-patches@sourceware.org References: <20190307121149.GA14543@delia> Message-ID: <1eee475f-85ed-a480-92c1-b440de699f9b@suse.de> Date: Tue, 23 Apr 2019 14:21:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <20190307121149.GA14543@delia> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-04/txt/msg00458.txt.bz2 On 07-03-19 13:11, Tom de Vries wrote: > 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. > Ping. 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 >