backward-cpp
backward-cpp copied to clipboard
Support libdwarf >= 20210528
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.
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.