backward-cpp icon indicating copy to clipboard operation
backward-cpp copied to clipboard

Support libdwarf >= 20210528

Open jgcodes2020 opened this issue 4 years ago • 1 comments
trafficstars

My library links in a relatively recent version of libdwarf, commit c70361. This version removed old methods (like dwarf_get_ranges_a, dwarf_siblingof) in favour of the latest versions of the function (i.e. dwarf_get_ranges_b, dwarf_siblingof_b). In addition, it deprecated pulling in libelf, you should instead use dwarf_init_path.

Gist with my compiler's error logs

jgcodes2020 avatar Jul 29 '21 20:07 jgcodes2020

To avoid compatibility problems, it should be best to focus on the 0.x.y releases of libdwarf which utilize the libdwarf-0 include directory instead of the libdwarf include directory (https://github.com/bombela/backward-cpp/pull/237). With all the API functions changing a separate macro like BACKWARD_HAS_DWARF0 could be used to allow the older API to remain while the newer API receives more testing.

okeuday avatar Jan 16 '23 19:01 okeuday