libdwarf
Loading...
Searching...
No Matches
Using dwarf_init_path_dl()

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.

See also
https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html

An example calling dwarf_init_path_dl() and dwarf_finish()

Parameters
pathPath to an object we wish to open.
groupnumberDesired groupnumber. Use DW_DW_GROUPNUMBER_ANY unless you have reason to do otherwise.
errorA pointer we can use to record error details.
Returns
Returns the applicable result. DW_DLV_OK etc.