summaryrefslogtreecommitdiff
path: root/binutils/dwarf.h
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2017-09-22 17:05:51 -0300
committerAlexandre Oliva <aoliva@redhat.com>2017-09-22 17:05:51 -0300
commit9f272209118972864b2c3799ddf2b39683c1a7b7 (patch)
treed58a44a74397bb6499ee83ea011bf156c66b9cff /binutils/dwarf.h
parent43573013c9836f2b91b74b9b29dac35fdb41e06b (diff)
downloadbinutils-gdb-9f272209118972864b2c3799ddf2b39683c1a7b7.tar.gz
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.
Diffstat (limited to 'binutils/dwarf.h')
-rw-r--r--binutils/dwarf.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/binutils/dwarf.h b/binutils/dwarf.h
index 4d3330c2b9e..15719eef85c 100644
--- a/binutils/dwarf.h
+++ b/binutils/dwarf.h
@@ -170,9 +170,12 @@ typedef struct
dwarf_vma ranges_base;
/* This is an array of offsets to the location list table. */
dwarf_vma * loc_offsets;
+ /* This is an array of offsets to the location view table. */
+ dwarf_vma * loc_views;
int * have_frame_base;
unsigned int num_loc_offsets;
unsigned int max_loc_offsets;
+ unsigned int num_loc_views;
/* List of .debug_ranges offsets seen in this .debug_info. */
dwarf_vma * range_lists;
unsigned int num_range_lists;