libdwarf
|
Example focused on GNU debuglink data.
In case GNU debuglink data is followed the true_pathbuf content will not match path. The path actually used is copied to true_path_out.
In the case of MacOS dSYM the true_path_out may not match path.
If debuglink data is missing from the Elf executable or shared-object (ie, it is a normal object!) or unusable by libdwarf or true_path_buffer len is zero or true_path_out_buffer is zero libdwarf accepts the path given as the object to report on, no debuglink or dSYM processing will be used.
An example calling dwarf_init_path_dl() and dwarf_finish()
path | Path to an object we wish to open. |
groupnumber | Desired groupnumber. Use DW_DW_GROUPNUMBER_ANY unless you have reason to do otherwise. |
error | A pointer we can use to record error details. |