Correctly handle fn DIE with abstract_origin in alt debug info
authorDodji Seketeli <dodji@redhat.com>
Thu, 12 Nov 2015 12:44:59 +0000 (13:44 +0100)
committerDodji Seketeli <dodji@redhat.com>
Thu, 12 Nov 2015 15:53:36 +0000 (16:53 +0100)
commit18c3ce3e568b990bf3891c8b0806352f26da756d
treecf09b226ce4571c19284b1de7211ab1eaaa3331c
parent17b04f2e047289fcceec91a535c22d7fe0eafb33
Correctly handle fn DIE with abstract_origin in alt debug info

When a function decl DIE is in the main DWARF file but has an abstract
origin that is in the alternate DWARF file, the dwarf reader
mistakenly considers the resulting function decl as being for a DIE
that is in the alternate DWARF file.

Fixed thus.

* src/abg-dwarf-reader.cc (build_ir_node_from_die): Consider that
the function decl is for a DIE in the alternate debug info file only if
the DIE itself comes from the alternate debug info file, not if
the specification or the origin of the function comes from the
alternate debug info file.
* tests/data/test-diff-pkg/qemu-img-rhev-2.3.0-20.el7.ppc64.rpm:
New test input rpm.
* tests/data/test-diff-pkg/qemu-img-rhev-2.3.0-7.el7.ppc64.rpm: Likewise.
* tests/data/test-diff-pkg/qemu-kvm-rhev-debuginfo-2.3.0-20.el7.ppc64.rpm: Likewise.
* tests/data/test-diff-pkg/qemu-kvm-rhev-debuginfo-2.3.0-7.el7.ppc64.rpm: Likewise.
* tests/data/test-diff-pkg/qemu-img-rhev-2.3.0-7.el7.ppc64--qemu-img-rhev-2.3.0-20.el7.ppc64-report-0.txt:
New test reference output.
* tests/data/Makefile.am: Add the new test material to the source
distribution.
* tests/test-diff-pkg.cc (in_out_specs): Use the new test rpm
inputs.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
src/abg-dwarf-reader.cc
tests/data/Makefile.am
tests/data/test-diff-pkg/qemu-img-rhev-2.3.0-20.el7.ppc64.rpm [new file with mode: 0644]
tests/data/test-diff-pkg/qemu-img-rhev-2.3.0-7.el7.ppc64--qemu-img-rhev-2.3.0-20.el7.ppc64-report-0.txt [new file with mode: 0644]
tests/data/test-diff-pkg/qemu-img-rhev-2.3.0-7.el7.ppc64.rpm [new file with mode: 0644]
tests/data/test-diff-pkg/qemu-kvm-rhev-debuginfo-2.3.0-20.el7.ppc64.rpm [new file with mode: 0644]
tests/data/test-diff-pkg/qemu-kvm-rhev-debuginfo-2.3.0-7.el7.ppc64.rpm [new file with mode: 0644]
tests/test-diff-pkg.cc