]> git.ipfire.org Git - thirdparty/elfutils.git/commit
libdw: Search for abstract origin in the correct CU
authorMark Wielaard <mark@klomp.org>
Sat, 21 Jan 2023 23:31:57 +0000 (00:31 +0100)
committerMark Wielaard <mark@klomp.org>
Mon, 30 Jan 2023 21:05:41 +0000 (22:05 +0100)
commitb7c7d8776ed46e2237d18fb15c6b72e83cfa259b
tree880bcb194268909ebac5147a0d10b23fc508f856
parentc6b38c2d670f7db732a34fd8e65e94942801c0f8
libdw: Search for abstract origin in the correct CU

With gcc -flto the abstract origin of an inlined subroutine
could be in a different CU. dwarf_getscopes might return an
empty scope if it cannot find the abstract origin scope. So
make sure to search in the

We also tried to add the origin match in pc_record directly
in the current inlined scope. This always failed, causing
to do a needless traversal, followed by the full CU scan in
dwarf_getscopes. Just always stop the pc_record search and
then do the CU origin_match in dwarf_getscopes.

Signed-off-by: Mark Wielaard <mark@klomp.org>
libdw/ChangeLog
libdw/dwarf_getscopes.c
tests/ChangeLog
tests/Makefile.am
tests/run-addr2line-i-test.sh
tests/testfile-inlines-lto.bz2 [new file with mode: 0755]