public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] [gdb/testsuite] Fix base address selection entry encoding in dw2-skip-prologue.S
@ 2019-05-14  8:10 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2019-05-14  8:10 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2764128dee821448ba43a50ed8cee387f2ee8dca

commit 2764128dee821448ba43a50ed8cee387f2ee8dca
Author: Tom de Vries <tdevries@suse.de>
Date:   Tue May 14 10:10:08 2019 +0200

    [gdb/testsuite] Fix base address selection entry encoding in dw2-skip-prologue.S
    
    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.
    
    gdb/testsuite/ChangeLog:
    
    2019-05-14  Tom de Vries  <tdevries@suse.de>
    
    	* gdb.dwarf2/dw2-skip-prologue.S (.debug_loc): Fix base address
    	selection entry encoding.

Diff:
---
 gdb/testsuite/ChangeLog                      | 5 +++++
 gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 252a183..d8847bc 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2019-05-14  Tom de Vries  <tdevries@suse.de>
+
+	* gdb.dwarf2/dw2-skip-prologue.S (.debug_loc): Fix base address
+	selection entry encoding.
+
 2019-05-10  Tom Tromey  <tromey@adacore.com>
 
 	* gdb.ada/info_exc.exp: Add "complete" test.
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S b/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S
index cef6e6d..a55699f 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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-05-14  8:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-14  8:10 [binutils-gdb] [gdb/testsuite] Fix base address selection entry encoding in dw2-skip-prologue.S Tom de Vries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).