\doxysection{Detaching a tied dbg }
\hypertarget{group__example3}{}\label{group__example3}\index{Detaching a tied dbg@{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..


\begin{DoxyCode}{0}
\DoxyCodeLine{*/}
\DoxyCodeLine{\textcolor{keywordtype}{int}\ example3(\doxymbox{\hyperlink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\_Debug}}\ split\_dbg,\doxymbox{\hyperlink{group__allstructs_ga8d4fac0e48040b6ca91e06ffda09766a}{Dwarf\_Error\ <em>}}error)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordtype}{int}\ res\ =\ 0;}
\DoxyCodeLine{\ \ \ \ res\ =\ \doxymbox{\hyperlink{group__initfunctions_ga4d7ccb86c49acbff43dc0fe2ad87068e}{dwarf\_set\_tied\_dbg}}(split\_dbg,NULL,error);}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{if}\ (res\ !=\ DW\_DLV\_OK)\ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ /</em>\ Something\ went\ wrong}

\end{DoxyCode}
