libdw: Search for the last matching address with dwarf_getsrc_die.
authorMark Wielaard <mjw@redhat.com>
Wed, 24 Dec 2014 12:17:23 +0000 (13:17 +0100)
committerMark Wielaard <mjw@redhat.com>
Fri, 16 Jan 2015 08:04:43 +0000 (09:04 +0100)
commitddbf23a4594b5a6f1b387b15d42312a203075d80
tree7418dd4df029b0cb2d5882f6235da5d642630638
parentf8198f2322b93dea4efbcf491b073a89e8aab1bf
libdw: Search for the last matching address with dwarf_getsrc_die.

In commit 7d9b5a dwfl_module_getsrc was changed so that it returns the last
line record <= addr, rather than returning immediately on a match. This
changes dwarf_getsrc_die to do the same. And it adds a new test that checks
this by comparing against the same results from eu-addr2line (which uses
dwfl_module_getsrc) using dwarf_addrdie and dwarf_getsrc_die instead.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
libdw/ChangeLog
libdw/dwarf_getsrc_die.c
tests/Makefile.am
tests/getsrc_die.c [new file with mode: 0644]
tests/run-getsrc-die.sh [new file with mode: 0755]