readelf: Use correct listptr when looking up next loc for locview attr.
authorMark Wielaard <mark@klomp.org>
Wed, 30 May 2018 09:54:31 +0000 (11:54 +0200)
committerMark Wielaard <mark@klomp.org>
Thu, 31 May 2018 19:09:08 +0000 (21:09 +0200)
We were using loclistsptr instead of locsptr in print_debug_loc_section.

https://sourceware.org/bugzilla/show_bug.cgi?id=23247

Signed-off-by: Mark Wielaard <mark@klomp.org>
src/ChangeLog
src/readelf.c

index 03ed5aa..0e6f1f2 100644 (file)
@@ -1,3 +1,8 @@
+2018-05-30  Mark Wielaard  <mark@klomp.org>
+
+       * readelf.c (print_debug_loc_section): Use correct listptr for
+       locview attribute.
+
 2018-05-31  Mark Wielaard  <mark@klomp.org>
 
        * readelf.c (print_debug_units): Check offset against -1 not ~0ul.
index 470a94e..db7723d 100644 (file)
@@ -9244,7 +9244,7 @@ print_debug_loc_section (Dwfl_Module *dwflmod,
 
       if (attr == DW_AT_GNU_locviews)
        {
-         Dwarf_Off next_off = next_listptr_offset (&known_loclistsptr,
+         Dwarf_Off next_off = next_listptr_offset (&known_locsptr,
                                                    listptr_idx);
          const unsigned char *locp = readp;
          const unsigned char *locendp;