Mark Wielaard 5918a2
commit 568d77ce8e0a508fbbd9e71e9938d6dab1639912
Mark Wielaard 5918a2
Author: mjw <mjw@a5019735-40e9-0310-863c-91ae7b9d1cf9>
Mark Wielaard 5918a2
Date:   Wed Nov 20 11:54:38 2013 +0000
Mark Wielaard 5918a2
Mark Wielaard 5918a2
    dwz compressed alternate .debug_info and .debug_str not read correctly.
Mark Wielaard 5918a2
    
Mark Wielaard 5918a2
    Bug #327837. The buildid from the .gnu_debugaltlink section was parsed
Mark Wielaard 5918a2
    incorrectly (from the wrong offset). Causing the debug alt file not to
Mark Wielaard 5918a2
    be found.
Mark Wielaard 5918a2
    
Mark Wielaard 5918a2
    git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13715 a5019735-40e9-0310-863c-91ae7b9d1cf9
Mark Wielaard 5918a2
Mark Wielaard 5918a2
diff --git a/coregrind/m_debuginfo/readelf.c b/coregrind/m_debuginfo/readelf.c
Mark Wielaard 5918a2
index e72e0d7..b7d574a 100644
Mark Wielaard 5918a2
--- a/coregrind/m_debuginfo/readelf.c
Mark Wielaard 5918a2
+++ b/coregrind/m_debuginfo/readelf.c
Mark Wielaard 5918a2
@@ -2609,7 +2609,8 @@ Bool ML_(read_elf_debug_info) ( struct _DebugInfo* di )
Mark Wielaard 5918a2
       vg_assert(aimg == NULL);
Mark Wielaard 5918a2
 
Mark Wielaard 5918a2
       if (debugaltlink_escn.img != NULL) {
Mark Wielaard 5918a2
-         UInt buildid_offset = ML_(img_strlen)(debugaltlink_escn.img, 0)+1;
Mark Wielaard 5918a2
+         UInt buildid_offset = ML_(img_strlen)(debugaltlink_escn.img,
Mark Wielaard 5918a2
+                                               debugaltlink_escn.ioff)+1;
Mark Wielaard 5918a2
 
Mark Wielaard 5918a2
          vg_assert(buildid_offset < debugaltlink_escn.szB);
Mark Wielaard 5918a2