From 2764128dee821448ba43a50ed8cee387f2ee8dca Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Tue, 14 May 2019 10:10:08 +0200 Subject: [PATCH] [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 * gdb.dwarf2/dw2-skip-prologue.S (.debug_loc): Fix base address selection entry encoding. --- 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 252a183d979..d8847bc119b 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-05-14 Tom de Vries + + * gdb.dwarf2/dw2-skip-prologue.S (.debug_loc): Fix base address + selection entry encoding. + 2019-05-10 Tom Tromey * 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 cef6e6df129..a55699fdc66 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 -- 2.30.2