diff options
author | Petr Machata <pmachata@redhat.com> | 2011-03-08 23:25:51 +0100 |
---|---|---|
committer | Petr Machata <pmachata@redhat.com> | 2011-03-08 23:25:51 +0100 |
commit | f338f9ba56ce3f53138e1ab477c2ede44810d3fa (patch) | |
tree | 914236c24bcd6294aae9b839f5bf42e0b206eabb | |
parent | 36ec3954018af14b59c0fd44de7f0e66ac68101e (diff) | |
download | elfutils-f338f9ba56ce3f53138e1ab477c2ede44810d3fa.tar.gz |
dwarflint: Don't let sibling address mismatches to high-level
-rw-r--r-- | dwarflint/check_debug_info.cc | 1 | ||||
-rw-r--r-- | dwarflint/tests/garbage-4.bz2 | bin | 0 -> 2765 bytes | |||
-rwxr-xr-x | dwarflint/tests/run-bad.sh | 6 |
3 files changed, 6 insertions, 1 deletions
diff --git a/dwarflint/check_debug_info.cc b/dwarflint/check_debug_info.cc index 7b936cb9..31d65ac4 100644 --- a/dwarflint/check_debug_info.cc +++ b/dwarflint/check_debug_info.cc @@ -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 Binary files differnew file mode 100644 index 00000000..20e75d88 --- /dev/null +++ b/dwarflint/tests/garbage-4.bz2 diff --git a/dwarflint/tests/run-bad.sh b/dwarflint/tests/run-bad.sh index 0219340e..779ec27d 100755 --- a/dwarflint/tests/run-bad.sh +++ b/dwarflint/tests/run-bad.sh @@ -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 |