Message ID | 20190307121149.GA14543@delia |
---|---|
State | New, archived |
Headers |
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: <gdb-patches.sourceware.org> List-Unsubscribe: <mailto:gdb-patches-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs> 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 <gdb-patches@sourceware.org>; Thu, 7 Mar 2019 12:11:08 +0000 (UTC) Date: Thu, 7 Mar 2019 13:11:50 +0100 From: Tom de Vries <tdevries@suse.de> 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-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-IsSubscribed: yes |
Commit Message
Tom de Vries
March 7, 2019, 12:11 p.m. UTC
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 <tdevries@suse.de> * 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(-)
Comments
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 <tdevries@suse.de> > > * 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 >
On 23-04-19 16:21, Tom de Vries wrote: > 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 <tdevries@suse.de> >> >> * 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 >>
On 07-05-19 16:50, Tom de Vries wrote: > On 23-04-19 16:21, Tom de Vries wrote: >> 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 <tdevries@suse.de> >>> >>> * 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 >>>
* Tom de Vries <tdevries@suse.de> [2019-03-07 13:11:50 +0100]: > 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 <tdevries@suse.de> > > * gdb.dwarf2/dw2-skip-prologue.S (.debug_loc): Fix base address > selection entry encoding. This patch looks great. Please go ahead and apply it. Thanks, Andrew > > --- > 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
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