]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
dwarflint: Don't let sibling address mismatches to high-level
authorPetr Machata <pmachata@redhat.com>
Tue, 8 Mar 2011 22:25:51 +0000 (23:25 +0100)
committerPetr Machata <pmachata@redhat.com>
Tue, 8 Mar 2011 22:25:51 +0000 (23:25 +0100)
dwarflint/check_debug_info.cc
dwarflint/tests/garbage-4.bz2 [new file with mode: 0644]
dwarflint/tests/run-bad.sh

index 7b936cb91c117dbeb682df9d4b8359e2fc2a4ecb..31d65ac470a76aaa588411d8b7acef1dbc42111a 100644 (file)
@@ -571,6 +571,7 @@ namespace
                  << "this DIE claims that its sibling is "
                  << pri::hex (sibling_addr) << " but it's actually "
                  << pri::hex (die_off) << '.' << std::endl;
+               retval = -2;
              }
            sibling_addr = 0;
          }
diff --git a/dwarflint/tests/garbage-4.bz2 b/dwarflint/tests/garbage-4.bz2
new file mode 100644 (file)
index 0000000..20e75d8
Binary files /dev/null and b/dwarflint/tests/garbage-4.bz2 differ
index 0219340edffed8b3d2e49549bb6cee63060563d4..779ec27d7a9b0349a433d8a0b6215b5f4951c53c 100755 (executable)
@@ -27,7 +27,7 @@
 
 srcdir=$srcdir/tests
 
-testfiles hello.bad-1 hello.bad-3 garbage-1 garbage-2 garbage-3
+testfiles hello.bad-1 hello.bad-3 garbage-1 garbage-2 garbage-3 garbage-4
 
 testrun_compare ./dwarflint hello.bad-1 <<EOF
 error: .debug_info: DIE 0x83: abbrev section at 0x0 doesn't contain code 83.
@@ -54,3 +54,7 @@ EOF
 testrun_compare ./dwarflint --check=@low garbage-3 <<EOF
 error: .debug_abbrev: abbr. attribute 0xc: invalid attribute code 0.
 EOF
+
+testrun_compare ./dwarflint garbage-4 <<EOF
+error: .debug_info: DIE 0x6c: this DIE claims that its sibling is 0x80000085 but it's actually 0x85.
+EOF