binutils-gdb/include
Alexandre Oliva 9f27220911 LVU: dump loclists with locviews
When dumping location lists, also dump locview lists that may be
interspersed with them, and bring view pairs next to the corresponding
location list entries.

This patch supports DW_AT_GNU_locviews as a separate attribute for
DWARF4- loc_lists and split (dwo) loclists, as well as DWARF5
loclists.

It also supports, in DWARF5 loclists, the proposed
DW_LLE_GNU_view_pair loclist entry type proposed for DWARF6.


The tests use 32-bit DWARF, even on 64-bit targets, resolving offsets
to constants so as to reduce the risk that relocations be created for
them, or that the offsets be rejected as nonconstants.


The patch also adds an xfail to an unrelated test, namely dw5, so that
no unexpected fails remain on nds32*-elf, one of the tested targets.


Reviewed-by: Alan Modra <amodra@gmail.com>


for  include/ChangeLog

	* dwarf2.def (DW_AT_GNU_locviews): New.
	* dwarf2.h (enum dwarf_location_list_entry_type): Add
	DW_LLE_GNU_view_pair.
	(DW_LLE_view_pair): Define.

for  binutils/ChangeLog

	* dwarf.h (debug_info): Add loc_views and num_loc_views.
	* dwarf.c (vm1): New constant.
	(print_dwarf_view): New function.
	(read_and_display_attr_value): Support DW_AT_GNU_locviews.
	(process_debug_info): Keep num_loc_offsets and num_loc_views
	in sync.
	(display_view_pair_list): New function.
	(display_loc_list_dwo): Take vstart_ptr; update it.  Dump
	location view pairs before the range they apply to, when a
	viewlist augments the loc list.
	(display_loc_list): Likewise.  Check view numbers in range
	tests.
	(display_loclists_list): Likewise.  Handle view pair entries,
	and warn on trailing ones.
	(loc_views): New variable.
	(loc_offsets_compar): Compare loc_views if loc_offsets are the
	same.
	(display_debug_loc): Check and sort loc_views too.  Accept
	loc_view as expected_start.  Skip if lists and views are the
	same.  Dump locview list separately in order, and pass the
	locview list base to each list dump function.  Warn and skip
	overlap and hole checking if we find loclists and locviews to
	not be adjacent.
	* testsuite/binutils-all/locview-1.s: New.
	* testsuite/binutils-all/readelf.locview-1: New.
	* testsuite/binutils-all/locview-2.s: New.
	* testsuite/binutils-all/readelf.locview-2: New.
	* testsuite/binutils-all/readelf.exp: Run new tests.  Fix
	option spelling in pr18374 fail message.  XFAIL dw5 test on
	nds32*-elf.
2017-09-22 17:05:51 -03:00
..
aout Fix spelling typos. 2017-07-18 16:58:14 +01:00
cgen
coff
elf Missing relocation R_PPC_VLE_ADDR20 and add VLE flag to details in readelf 2017-09-05 08:42:27 +09:30
gdb Fix spelling typos. 2017-07-18 16:58:14 +01:00
mach-o Fix spelling typos. 2017-07-18 16:58:14 +01:00
nlm
opcode nds32: Rename __BIT() to N32_BIT(). 2017-09-11 13:46:27 +08:00
som
vms
alloca-conf.h
ansidecl.h Sync libiberty/ & include/ with GCC 2017-09-15 17:40:33 +01:00
bfdlink.h Treat common symbol as undefined for --no-define-common 2017-08-06 08:19:04 -07:00
binary-io.h
bout.h
ChangeLog LVU: dump loclists with locviews 2017-09-22 17:05:51 -03:00
ChangeLog-0415
ChangeLog-2016
ChangeLog-9103
COPYING
COPYING3
demangle.h
dis-asm.h binutils/objdump: Fix disassemble for huge elf sections 2017-07-14 22:51:01 +09:30
dwarf2.def LVU: dump loclists with locviews 2017-09-22 17:05:51 -03:00
dwarf2.h LVU: dump loclists with locviews 2017-09-22 17:05:51 -03:00
dyn-string.h
environ.h Fix MinGW compilation warnings due to environ.h 2017-05-31 09:35:07 +03:00
fibheap.h
filenames.h
floatformat.h
fnmatch.h
fopen-bin.h
fopen-same.h
fopen-vms.h
gcc-c-fe.def Sync libiberty/ & include/ with GCC 2017-09-15 17:40:33 +01:00
gcc-c-interface.h Sync libiberty/ & include/ with GCC 2017-09-15 17:40:33 +01:00
gcc-cp-fe.def Sync libiberty/ & include/ with GCC 2017-09-15 17:40:33 +01:00
gcc-cp-interface.h Sync libiberty/ & include/ with GCC 2017-09-15 17:40:33 +01:00
gcc-interface.h Sync libiberty/ & include/ with GCC 2017-09-15 17:40:33 +01:00
getopt.h
hashtab.h
hp-symtab.h
ieee.h
leb128.h
libiberty.h Sync libiberty/ & include/ with GCC 2017-09-15 17:40:33 +01:00
longlong.h Sync libiberty/ & include/ with GCC 2017-09-15 17:40:33 +01:00
lto-symtab.h
MAINTAINERS
md5.h
oasys.h
objalloc.h
obstack.h
os9k.h
partition.h
plugin-api.h
progress.h
safe-ctype.h
sha1.h
simple-object.h Sync libiberty/ & include/ with GCC 2017-09-15 17:40:33 +01:00
sort.h
splay-tree.h
symcat.h
timeval-utils.h
vtv-change-permission.h
xregex2.h
xregex.h
xtensa-config.h
xtensa-isa-internal.h
xtensa-isa.h