libdwarf: Detaching a tied dbg

libdwarf

Loading...
Searching...
No Matches
Detaching a tied dbg

Example detaching a tied (executable) dbg.

Example detaching a tied (executable) dbg.

See DWARF5 Appendix F on Split-DWARF.

With split dwarf your libdwarf calls after than the initial open are done against the split Dwarf_Dbg and libdwarf automatically looks in the open tied dbg when and as appropriate. the tied-dbg can be detached too, see example3 link, though you must call dwarf_finish() on the detached dw_tied_dbg, the library will not do that for you..

*/
int example3(Dwarf_Debug split_dbg,Dwarf_Error <em>error)
{
int res = 0;
res = dwarf_set_tied_dbg(split_dbg,NULL,error);
if (res != DW_DLV_OK) {
/</em> Something went wrong
Dwarf_Error
struct Dwarf_Error_s * Dwarf_Error
Definition libdwarf.h:611
Dwarf_Debug
struct Dwarf_Debug_s * Dwarf_Debug
Definition libdwarf.h:617
dwarf_set_tied_dbg
DW_API int dwarf_set_tied_dbg(Dwarf_Debug dw_split_dbg, Dwarf_Debug dw_tied_dbg, Dwarf_Error *dw_error)
Use with split dwarf.