libdwfl: Another segment lookup table nit.
authorRoland McGrath <roland@redhat.com>
Thu, 6 May 2010 08:12:15 +0000 (01:12 -0700)
committerRoland McGrath <roland@redhat.com>
Thu, 6 May 2010 08:12:15 +0000 (01:12 -0700)
libdwfl/ChangeLog
libdwfl/segment.c

index b1ba7a5..8d87d19 100644 (file)
@@ -1,5 +1,7 @@
 2010-05-06  Roland McGrath  <roland@redhat.com>
 
+       * segment.c (insert): Clear inserted elements of DWFL->lookup_module.
+
        * libdwflP.h (DWFL_ERRORS): Add WRONG_ID_ELF.
        * dwfl_build_id_find_elf.c: Set MOD->main.valid when there is a build
        ID but we didn't find a file.
index d39fdab..9d78c87 100644 (file)
@@ -121,6 +121,8 @@ insert (Dwfl *dwfl, size_t i, GElf_Addr start, GElf_Addr end, int segndx)
     {
       dwfl->lookup_addr[i] = start;
       dwfl->lookup_segndx[i] = segndx;
+      if (dwfl->lookup_module != NULL)
+       dwfl->lookup_module[i] = NULL;
       ++i;
     }
   else
@@ -130,6 +132,8 @@ insert (Dwfl *dwfl, size_t i, GElf_Addr start, GElf_Addr end, int segndx)
     {
       dwfl->lookup_addr[i] = end;
       dwfl->lookup_segndx[i] = -1;
+      if (dwfl->lookup_module != NULL)
+       dwfl->lookup_module[i] = NULL;
     }
 
   dwfl->lookup_elts += need;