]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
dwarflint: Fix checking of missing DW_AT_sibling
authorPetr Machata <pmachata@redhat.com>
Tue, 4 Aug 2009 13:49:08 +0000 (15:49 +0200)
committerPetr Machata <pmachata@redhat.com>
Tue, 4 Aug 2009 13:49:08 +0000 (15:49 +0200)
src/dwarflint.c

index 9ad978f1d45f44b853e1be0fc2ca1d5d6d1f2937..b888d16e31ee2c2f9a5cdde6cc17f4ce620d0aff 100644 (file)
@@ -2647,7 +2647,8 @@ read_die_chain (struct elf_file *file,
   bool got_die = false;
   uint64_t sibling_addr = 0;
   uint64_t die_off, prev_die_off = 0;
-  struct abbrev *abbrev, *prev_abbrev = NULL;
+  struct abbrev *abbrev = NULL;
+  struct abbrev *prev_abbrev = NULL;
   struct where where = WHERE (sec_info, NULL);
 
   while (!read_ctx_eof (ctx))
@@ -2696,6 +2697,7 @@ read_die_chain (struct elf_file *file,
       got_die = true;
 
       /* Find the abbrev matching the code.  */
+      prev_abbrev = abbrev;
       abbrev = abbrev_table_find_abbrev (abbrevs, abbr_code);
       if (abbrev == NULL)
        {