summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2018-01-19 23:59:21 +0100
committerMark Wielaard <mark@klomp.org>2018-01-25 16:30:47 +0100
commit240a068fcf3eb6bbcda525f80c8778de62621d9e (patch)
treee6ed4947e17dc97c77e99ddc1d649231c92c49e8 /lib
parent4407903a7433327dbeda74519d036fc82ef64de3 (diff)
libdw: Resolve alt file on first use.
Add a new alt_fd field to the Dwarf struct. This tracks whether we tried to open the alt file ourselves. This is used in dwarf_getalt to see if we should try to find and open the alt file ourselves (if the user hasn't called dwarf_setalt yet). dwarf_formref_die and dwarf_formstring now call dwarf_getalt instead of accessing the alt_dwarf Dwarf field directly. For applications using libdwfl nothing changes (dwfl will find, set and clean up the alt file). For programs that set the alt file themselves already through other means, nothing changes. But for applications that don't create the Dwarf through libdwfl and don't set the alt file already libdw will now try to find and set it on first access. If found the application will now not get errors for missing alt files. Add a simple testcase based on the existing allfcts test which already tries to set the alt file, but is too simplistic to find it in some subdir (relative to the main debug file). Signed-off-by: Mark Wielaard <mark@klomp.org>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions