\doxysection{Libdwarf Initialization Functions }
\hypertarget{group__initfunctions}{}\label{group__initfunctions}\index{Libdwarf Initialization Functions@{Libdwarf Initialization Functions}}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
DW\+\_\+\+API int \doxymbox{\hyperlink{group__initfunctions_ga8970fc7d21c9bfe1e7b33fe86579dd3d}{dwarf\+\_\+init\+\_\+path}} (const char \texorpdfstring{$\ast$}{*}dw\+\_\+path, char \texorpdfstring{$\ast$}{*}dw\+\_\+true\+\_\+path\+\_\+out\+\_\+buffer, unsigned int dw\+\_\+true\+\_\+path\+\_\+bufferlen, unsigned int dw\+\_\+groupnumber, \doxymbox{\hyperlink{group__allstructs_ga6de1c2929cebfae36804315f7232cb19}{Dwarf\+\_\+\+Handler}} dw\+\_\+errhand, \doxymbox{\hyperlink{group__basicdatatypes_ga376c1939313af42401fc67bc998fdd2c}{Dwarf\+\_\+\+Ptr}} dw\+\_\+errarg, \doxymbox{\hyperlink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\+\_\+\+Debug}} \texorpdfstring{$\ast$}{*}dw\+\_\+dbg, \doxymbox{\hyperlink{group__allstructs_ga8d4fac0e48040b6ca91e06ffda09766a}{Dwarf\+\_\+\+Error}} \texorpdfstring{$\ast$}{*}dw\+\_\+error)
\begin{DoxyCompactList}\small\item\em Initialization based on path, the most common initialization. \end{DoxyCompactList}\item 
DW\+\_\+\+API int \doxymbox{\hyperlink{group__initfunctions_gac46672bc652e351ce33e6ac53dfa18c3}{dwarf\+\_\+init\+\_\+path\+\_\+a}} (const char \texorpdfstring{$\ast$}{*}dw\+\_\+path, char \texorpdfstring{$\ast$}{*}dw\+\_\+true\+\_\+path\+\_\+out\+\_\+buffer, unsigned int dw\+\_\+true\+\_\+path\+\_\+bufferlen, unsigned int dw\+\_\+groupnumber, unsigned int dw\+\_\+universalnumber, \doxymbox{\hyperlink{group__allstructs_ga6de1c2929cebfae36804315f7232cb19}{Dwarf\+\_\+\+Handler}} dw\+\_\+errhand, \doxymbox{\hyperlink{group__basicdatatypes_ga376c1939313af42401fc67bc998fdd2c}{Dwarf\+\_\+\+Ptr}} dw\+\_\+errarg, \doxymbox{\hyperlink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\+\_\+\+Debug}} \texorpdfstring{$\ast$}{*}dw\+\_\+dbg, \doxymbox{\hyperlink{group__allstructs_ga8d4fac0e48040b6ca91e06ffda09766a}{Dwarf\+\_\+\+Error}} \texorpdfstring{$\ast$}{*}dw\+\_\+error)
\begin{DoxyCompactList}\small\item\em Initialization based on path. \end{DoxyCompactList}\item 
DW\+\_\+\+API int \doxymbox{\hyperlink{group__initfunctions_ga8f0107a24ee3013be3f4853295800ff4}{dwarf\+\_\+init\+\_\+path\+\_\+dl}} (const char \texorpdfstring{$\ast$}{*}dw\+\_\+path, char \texorpdfstring{$\ast$}{*}dw\+\_\+true\+\_\+path\+\_\+out\+\_\+buffer, unsigned int dw\+\_\+true\+\_\+path\+\_\+bufferlen, unsigned int dw\+\_\+groupnumber, \doxymbox{\hyperlink{group__allstructs_ga6de1c2929cebfae36804315f7232cb19}{Dwarf\+\_\+\+Handler}} dw\+\_\+errhand, \doxymbox{\hyperlink{group__basicdatatypes_ga376c1939313af42401fc67bc998fdd2c}{Dwarf\+\_\+\+Ptr}} dw\+\_\+errarg, \doxymbox{\hyperlink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\+\_\+\+Debug}} \texorpdfstring{$\ast$}{*}dw\+\_\+dbg, char \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}dw\+\_\+dl\+\_\+path\+\_\+array, unsigned int dw\+\_\+dl\+\_\+path\+\_\+array\+\_\+size, unsigned char \texorpdfstring{$\ast$}{*}dw\+\_\+dl\+\_\+path\+\_\+source, \doxymbox{\hyperlink{group__allstructs_ga8d4fac0e48040b6ca91e06ffda09766a}{Dwarf\+\_\+\+Error}} \texorpdfstring{$\ast$}{*}dw\+\_\+error)
\begin{DoxyCompactList}\small\item\em Initialization following GNU debuglink section data. \end{DoxyCompactList}\item 
DW\+\_\+\+API int \doxymbox{\hyperlink{group__initfunctions_ga62b9292c851fd242e18f9716c1d6e3b8}{dwarf\+\_\+init\+\_\+path\+\_\+dl\+\_\+a}} (const char \texorpdfstring{$\ast$}{*}dw\+\_\+path, char \texorpdfstring{$\ast$}{*}dw\+\_\+true\+\_\+path\+\_\+out\+\_\+buffer, unsigned int dw\+\_\+true\+\_\+path\+\_\+bufferlen, unsigned int dw\+\_\+groupnumber, unsigned int dw\+\_\+universalnumber, \doxymbox{\hyperlink{group__allstructs_ga6de1c2929cebfae36804315f7232cb19}{Dwarf\+\_\+\+Handler}} dw\+\_\+errhand, \doxymbox{\hyperlink{group__basicdatatypes_ga376c1939313af42401fc67bc998fdd2c}{Dwarf\+\_\+\+Ptr}} dw\+\_\+errarg, \doxymbox{\hyperlink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\+\_\+\+Debug}} \texorpdfstring{$\ast$}{*}dw\+\_\+dbg, char \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}dw\+\_\+dl\+\_\+path\+\_\+array, unsigned int dw\+\_\+dl\+\_\+path\+\_\+array\+\_\+size, unsigned char \texorpdfstring{$\ast$}{*}dw\+\_\+dl\+\_\+path\+\_\+source, \doxymbox{\hyperlink{group__allstructs_ga8d4fac0e48040b6ca91e06ffda09766a}{Dwarf\+\_\+\+Error}} \texorpdfstring{$\ast$}{*}dw\+\_\+error)
\begin{DoxyCompactList}\small\item\em Initialization based on path with debuglink. \end{DoxyCompactList}\item 
DW\+\_\+\+API int \doxymbox{\hyperlink{group__initfunctions_ga14c7d234b10005a8b2dfc320bbc775c9}{dwarf\+\_\+init\+\_\+b}} (int dw\+\_\+fd, unsigned int dw\+\_\+groupnumber, \doxymbox{\hyperlink{group__allstructs_ga6de1c2929cebfae36804315f7232cb19}{Dwarf\+\_\+\+Handler}} dw\+\_\+errhand, \doxymbox{\hyperlink{group__basicdatatypes_ga376c1939313af42401fc67bc998fdd2c}{Dwarf\+\_\+\+Ptr}} dw\+\_\+errarg, \doxymbox{\hyperlink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\+\_\+\+Debug}} \texorpdfstring{$\ast$}{*}dw\+\_\+dbg, \doxymbox{\hyperlink{group__allstructs_ga8d4fac0e48040b6ca91e06ffda09766a}{Dwarf\+\_\+\+Error}} \texorpdfstring{$\ast$}{*}dw\+\_\+error)
\begin{DoxyCompactList}\small\item\em Initialization based on Unix/\+\+Linux (etc) fd. \end{DoxyCompactList}\item 
DW\+\_\+\+API int \doxymbox{\hyperlink{group__initfunctions_ga14a505c07ee5481401735f280f719454}{dwarf\+\_\+finish}} (\doxymbox{\hyperlink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\+\_\+\+Debug}} dw\+\_\+dbg)
\begin{DoxyCompactList}\small\item\em Close the initialized dw\+\_\+dbg and free all data libdwarf has for this dw\+\_\+dbg. \end{DoxyCompactList}\item 
DW\+\_\+\+API int \doxymbox{\hyperlink{group__initfunctions_ga44350f3d6a177c86332cdbb30fa78d9e}{dwarf\+\_\+object\+\_\+init\+\_\+b}} (\doxymbox{\hyperlink{group__allstructs_ga80e90b3f3f60f28d0098a1e0cd6cb371}{Dwarf\+\_\+\+Obj\+\_\+\+Access\+\_\+\+Interface\+\_\+a}} \texorpdfstring{$\ast$}{*}dw\+\_\+obj, \doxymbox{\hyperlink{group__allstructs_ga6de1c2929cebfae36804315f7232cb19}{Dwarf\+\_\+\+Handler}} dw\+\_\+errhand, \doxymbox{\hyperlink{group__basicdatatypes_ga376c1939313af42401fc67bc998fdd2c}{Dwarf\+\_\+\+Ptr}} dw\+\_\+errarg, unsigned int dw\+\_\+groupnumber, \doxymbox{\hyperlink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\+\_\+\+Debug}} \texorpdfstring{$\ast$}{*}dw\+\_\+dbg, \doxymbox{\hyperlink{group__allstructs_ga8d4fac0e48040b6ca91e06ffda09766a}{Dwarf\+\_\+\+Error}} \texorpdfstring{$\ast$}{*}dw\+\_\+error)
\begin{DoxyCompactList}\small\item\em Used to access DWARF information in memory or in an object format unknown to libdwarf. \end{DoxyCompactList}\item 
DW\+\_\+\+API int \doxymbox{\hyperlink{group__initfunctions_ga33dd7f21bad8725f5878e73e3c671fd9}{dwarf\+\_\+object\+\_\+finish}} (\doxymbox{\hyperlink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\+\_\+\+Debug}} dw\+\_\+dbg)
\begin{DoxyCompactList}\small\item\em Used to close the object\+\_\+init dw\+\_\+dbg. \end{DoxyCompactList}\item 
DW\+\_\+\+API int \doxymbox{\hyperlink{group__initfunctions_ga4d7ccb86c49acbff43dc0fe2ad87068e}{dwarf\+\_\+set\+\_\+tied\+\_\+dbg}} (\doxymbox{\hyperlink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\+\_\+\+Debug}} dw\+\_\+split\+\_\+dbg, \doxymbox{\hyperlink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\+\_\+\+Debug}} dw\+\_\+tied\+\_\+dbg, \doxymbox{\hyperlink{group__allstructs_ga8d4fac0e48040b6ca91e06ffda09766a}{Dwarf\+\_\+\+Error}} \texorpdfstring{$\ast$}{*}dw\+\_\+error)
\begin{DoxyCompactList}\small\item\em Use with split dwarf. \end{DoxyCompactList}\item 
DW\+\_\+\+API int \doxymbox{\hyperlink{group__initfunctions_ga45ce0daa83143d5c1bbf4c8039e7b611}{dwarf\+\_\+get\+\_\+tied\+\_\+dbg}} (\doxymbox{\hyperlink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\+\_\+\+Debug}} dw\+\_\+dbg, \doxymbox{\hyperlink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\+\_\+\+Debug}} \texorpdfstring{$\ast$}{*}dw\+\_\+tieddbg\+\_\+out, \doxymbox{\hyperlink{group__allstructs_ga8d4fac0e48040b6ca91e06ffda09766a}{Dwarf\+\_\+\+Error}} \texorpdfstring{$\ast$}{*}dw\+\_\+error)
\begin{DoxyCompactList}\small\item\em Use with split dwarf. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
\hypertarget{group__initfunctions_initfinish}{}\doxysubsection{\texorpdfstring{Initialization And Finish Operations}{Initialization And Finish Operations}}\label{group__initfunctions_initfinish}
Opening and closing libdwarf on object files. 

\label{doc-func-members}
\Hypertarget{group__initfunctions_doc-func-members}
\doxysubsection{Function Documentation}
\Hypertarget{group__initfunctions_ga14a505c07ee5481401735f280f719454}\index{Libdwarf Initialization Functions@{Libdwarf Initialization Functions}!dwarf\_finish@{dwarf\_finish}}
\index{dwarf\_finish@{dwarf\_finish}!Libdwarf Initialization Functions@{Libdwarf Initialization Functions}}
\doxysubsubsection{\texorpdfstring{dwarf\_finish()}{dwarf\_finish()}}
{\footnotesize\ttfamily \label{group__initfunctions_ga14a505c07ee5481401735f280f719454} 
DW\+\_\+\+API int dwarf\+\_\+finish (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\+\_\+\+Debug}}}]{dw\+\_\+dbg}{}\end{DoxyParamCaption})}



Close the initialized dw\+\_\+dbg and free all data libdwarf has for this dw\+\_\+dbg. 


\begin{DoxyParams}{Parameters}
{\em dw\+\_\+dbg} & Close the dbg. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
May return DW\+\_\+\+DLV\+\_\+\+ERROR if something is very wrong:\+ no further information is available.. May return DW\+\_\+\+DLV\+\_\+\+NO\+\_\+\+ENTRY but no further information is available. Normally returns DW\+\_\+\+DLV\+\_\+\+OK.
\end{DoxyReturn}
There is nothing the caller can do with the return value except report it somehow. Most callers ignore the return value. \Hypertarget{group__initfunctions_ga45ce0daa83143d5c1bbf4c8039e7b611}\index{Libdwarf Initialization Functions@{Libdwarf Initialization Functions}!dwarf\_get\_tied\_dbg@{dwarf\_get\_tied\_dbg}}
\index{dwarf\_get\_tied\_dbg@{dwarf\_get\_tied\_dbg}!Libdwarf Initialization Functions@{Libdwarf Initialization Functions}}
\doxysubsubsection{\texorpdfstring{dwarf\_get\_tied\_dbg()}{dwarf\_get\_tied\_dbg()}}
{\footnotesize\ttfamily \label{group__initfunctions_ga45ce0daa83143d5c1bbf4c8039e7b611} 
DW\+\_\+\+API int dwarf\+\_\+get\+\_\+tied\+\_\+dbg (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\+\_\+\+Debug}}}]{dw\+\_\+dbg}{, }\item[{\doxymbox{\hyperlink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\+\_\+\+Debug}} \texorpdfstring{$\ast$}{*}}]{dw\+\_\+tieddbg\+\_\+out}{, }\item[{\doxymbox{\hyperlink{group__allstructs_ga8d4fac0e48040b6ca91e06ffda09766a}{Dwarf\+\_\+\+Error}} \texorpdfstring{$\ast$}{*}}]{dw\+\_\+error}{}\end{DoxyParamCaption})}



Use with split dwarf. 

Given a main \doxylink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\+\_\+\+Debug} this returns the tied \doxylink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\+\_\+\+Debug} if there is one or else returns null(0).

Before v0.\+11.\+0 it was not defined what this returned if the tied-\/\+Dwarf\+\_\+\+Debug was passed in, but it would have returned null(0) in that case. Unlikely anyone uses this call as callers had the tied and base dbg when calling \doxylink{group__initfunctions_ga4d7ccb86c49acbff43dc0fe2ad87068e}{dwarf\+\_\+set\+\_\+tied\+\_\+dbg()}.


\begin{DoxyParams}{Parameters}
{\em dw\+\_\+dbg} & Pass in a non-\/null \doxylink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\+\_\+\+Debug} which is either a main-\/\+Dwarf\+\_\+\+Debug or a tied-\/\+Dwarf\+\_\+\+Debug. \\
\hline
{\em dw\+\_\+tieddbg\+\_\+out} & On success returns the applicable tied-\/\+Dwarf\+\_\+\+Debug through the pointer. If dw\+\_\+dbg is a tied-\/\+Dwarf\+\_\+\+Debug the function returns null(0) through the poiner. If there is no tied-\/\+Dwarf\+\_\+\+Debug (meaning there is just a main-\/\+Dwarf\+\_\+\+Debug) the function returns null (0) through the pointer. \\
\hline
{\em dw\+\_\+error} & If the dw\+\_\+dbg is invalid or damaged then the function returns DW\+\_\+\+DLV\+\_\+\+ERROR and dw\+\_\+error is set to point to the error details. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
DW\+\_\+\+DLV\+\_\+\+OK or DW\+\_\+\+DLV\+\_\+\+ERROR. Never returns DW\+\_\+\+DLV\+\_\+\+NO\+\_\+\+ENTRY. 
\end{DoxyReturn}
\Hypertarget{group__initfunctions_ga14c7d234b10005a8b2dfc320bbc775c9}\index{Libdwarf Initialization Functions@{Libdwarf Initialization Functions}!dwarf\_init\_b@{dwarf\_init\_b}}
\index{dwarf\_init\_b@{dwarf\_init\_b}!Libdwarf Initialization Functions@{Libdwarf Initialization Functions}}
\doxysubsubsection{\texorpdfstring{dwarf\_init\_b()}{dwarf\_init\_b()}}
{\footnotesize\ttfamily \label{group__initfunctions_ga14c7d234b10005a8b2dfc320bbc775c9} 
DW\+\_\+\+API int dwarf\+\_\+init\+\_\+b (\begin{DoxyParamCaption}\item[{int}]{dw\+\_\+fd}{, }\item[{unsigned int}]{dw\+\_\+groupnumber}{, }\item[{\doxymbox{\hyperlink{group__allstructs_ga6de1c2929cebfae36804315f7232cb19}{Dwarf\+\_\+\+Handler}}}]{dw\+\_\+errhand}{, }\item[{\doxymbox{\hyperlink{group__basicdatatypes_ga376c1939313af42401fc67bc998fdd2c}{Dwarf\+\_\+\+Ptr}}}]{dw\+\_\+errarg}{, }\item[{\doxymbox{\hyperlink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\+\_\+\+Debug}} \texorpdfstring{$\ast$}{*}}]{dw\+\_\+dbg}{, }\item[{\doxymbox{\hyperlink{group__allstructs_ga8d4fac0e48040b6ca91e06ffda09766a}{Dwarf\+\_\+\+Error}} \texorpdfstring{$\ast$}{*}}]{dw\+\_\+error}{}\end{DoxyParamCaption})}



Initialization based on Unix/\+\+Linux (etc) fd. 

In case DW\+\_\+\+DLV\+\_\+\+ERROR returned be sure to call dwarf\+\_\+dealloc\+\_\+error even though the returned \doxylink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\+\_\+\+Debug} is NULL.


\begin{DoxyParams}{Parameters}
{\em dw\+\_\+fd} & An open Unix/\+\+Linux/\+etc fd on the object file. \\
\hline
{\em dw\+\_\+groupnumber} & The value passed in should be DW\+\_\+\+GROUPNUMBER\+\_\+\+ANY unless one wishes to other than a standard group. \\
\hline
{\em dw\+\_\+errhand} & Pass in NULL unless one wishes libdwarf to call this error handling function (which you must write) instead of passing meaningful values to the dw\+\_\+error argument. \\
\hline
{\em dw\+\_\+errarg} & If dw\+\_\+errorhand is non-\/null, then this value (a pointer or integer that means something to you) is passed to the dw\+\_\+errhand function in case that is helpful to you. \\
\hline
{\em dw\+\_\+dbg} & On success, \texorpdfstring{$\ast$}{*}dw\+\_\+dbg is set to a pointer to a new \doxylink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\+\_\+\+Debug} structure to be used in calls to libdwarf functions. \\
\hline
{\em dw\+\_\+error} & In case return is DW\+\_\+\+DLV\+\_\+\+ERROR dw\+\_\+error is set to point to the error details. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
DW\+\_\+\+DLV\+\_\+\+OK etc. 
\end{DoxyReturn}
\Hypertarget{group__initfunctions_ga8970fc7d21c9bfe1e7b33fe86579dd3d}\index{Libdwarf Initialization Functions@{Libdwarf Initialization Functions}!dwarf\_init\_path@{dwarf\_init\_path}}
\index{dwarf\_init\_path@{dwarf\_init\_path}!Libdwarf Initialization Functions@{Libdwarf Initialization Functions}}
\doxysubsubsection{\texorpdfstring{dwarf\_init\_path()}{dwarf\_init\_path()}}
{\footnotesize\ttfamily \label{group__initfunctions_ga8970fc7d21c9bfe1e7b33fe86579dd3d} 
DW\+\_\+\+API int dwarf\+\_\+init\+\_\+path (\begin{DoxyParamCaption}\item[{const char \texorpdfstring{$\ast$}{*}}]{dw\+\_\+path}{, }\item[{char \texorpdfstring{$\ast$}{*}}]{dw\+\_\+true\+\_\+path\+\_\+out\+\_\+buffer}{, }\item[{unsigned int}]{dw\+\_\+true\+\_\+path\+\_\+bufferlen}{, }\item[{unsigned int}]{dw\+\_\+groupnumber}{, }\item[{\doxymbox{\hyperlink{group__allstructs_ga6de1c2929cebfae36804315f7232cb19}{Dwarf\+\_\+\+Handler}}}]{dw\+\_\+errhand}{, }\item[{\doxymbox{\hyperlink{group__basicdatatypes_ga376c1939313af42401fc67bc998fdd2c}{Dwarf\+\_\+\+Ptr}}}]{dw\+\_\+errarg}{, }\item[{\doxymbox{\hyperlink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\+\_\+\+Debug}} \texorpdfstring{$\ast$}{*}}]{dw\+\_\+dbg}{, }\item[{\doxymbox{\hyperlink{group__allstructs_ga8d4fac0e48040b6ca91e06ffda09766a}{Dwarf\+\_\+\+Error}} \texorpdfstring{$\ast$}{*}}]{dw\+\_\+error}{}\end{DoxyParamCaption})}



Initialization based on path, the most common initialization. 

On a Mach-\/O universal binary this function can only return information about the first (zero index) object in the universal binary.


\begin{DoxyParams}{Parameters}
{\em dw\+\_\+path} & Pass in the path to the object file to open. \\
\hline
{\em dw\+\_\+true\+\_\+path\+\_\+out\+\_\+buffer} & Pass in NULL or the name of a string buffer (The buffer should be initialized with an initial NUL byte) The returned string will be null-\/terminated. The path actually used is copied to true\+\_\+path\+\_\+out. If true\+\_\+path\+\_\+buffer len is zero or true\+\_\+path\+\_\+out\+\_\+buffer is zero then the Special Macos processing will not occur, nor will the GNU\+\_\+debuglink processing occur. In case GNU debuglink data was followed or Macos d\+SYM applies the true\+\_\+path\+\_\+out will not match path and the initial byte will be non-\/null. The value put in true\+\_\+path\+\_\+out is the actual file name. \\
\hline
{\em dw\+\_\+true\+\_\+path\+\_\+bufferlen} & Pass in the length in bytes of the buffer. \\
\hline
{\em dw\+\_\+groupnumber} & The value passed in should be DW\+\_\+\+GROUPNUMBER\+\_\+\+ANY unless one wishes to other than a standard group. \\
\hline
{\em dw\+\_\+errhand} & Pass in NULL unless one wishes libdwarf to call this error handling function (which you must write) instead of passing meaningful values to the dw\+\_\+error argument. \\
\hline
{\em dw\+\_\+errarg} & If dw\+\_\+errorhand is non-\/null, then this value (a pointer or integer that means something to you) is passed to the dw\+\_\+errhand function in case that is helpful to you. \\
\hline
{\em dw\+\_\+dbg} & On success, \texorpdfstring{$\ast$}{*}dw\+\_\+dbg is set to a pointer to a new \doxylink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\+\_\+\+Debug} structure to be used in calls to libdwarf functions. \\
\hline
{\em dw\+\_\+error} & In case return is DW\+\_\+\+DLV\+\_\+\+ERROR dw\+\_\+error is set to point to the error details. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
DW\+\_\+\+DLV\+\_\+\+OK etc.
\end{DoxyReturn}
\doxylink{index_dwsec_separatedebug}{Details on separate DWARF object access } \begin{DoxySeeAlso}{See also}
\doxylink{group__initfunctions_ga8f0107a24ee3013be3f4853295800ff4}{dwarf\+\_\+init\+\_\+path\+\_\+dl} \doxylink{group__initfunctions_ga14c7d234b10005a8b2dfc320bbc775c9}{dwarf\+\_\+init\+\_\+b} 

\doxylink{group__exampleinit}{Using dwarf\+\_\+init\+\_\+path()} 
\end{DoxySeeAlso}
\Hypertarget{group__initfunctions_gac46672bc652e351ce33e6ac53dfa18c3}\index{Libdwarf Initialization Functions@{Libdwarf Initialization Functions}!dwarf\_init\_path\_a@{dwarf\_init\_path\_a}}
\index{dwarf\_init\_path\_a@{dwarf\_init\_path\_a}!Libdwarf Initialization Functions@{Libdwarf Initialization Functions}}
\doxysubsubsection{\texorpdfstring{dwarf\_init\_path\_a()}{dwarf\_init\_path\_a()}}
{\footnotesize\ttfamily \label{group__initfunctions_gac46672bc652e351ce33e6ac53dfa18c3} 
DW\+\_\+\+API int dwarf\+\_\+init\+\_\+path\+\_\+a (\begin{DoxyParamCaption}\item[{const char \texorpdfstring{$\ast$}{*}}]{dw\+\_\+path}{, }\item[{char \texorpdfstring{$\ast$}{*}}]{dw\+\_\+true\+\_\+path\+\_\+out\+\_\+buffer}{, }\item[{unsigned int}]{dw\+\_\+true\+\_\+path\+\_\+bufferlen}{, }\item[{unsigned int}]{dw\+\_\+groupnumber}{, }\item[{unsigned int}]{dw\+\_\+universalnumber}{, }\item[{\doxymbox{\hyperlink{group__allstructs_ga6de1c2929cebfae36804315f7232cb19}{Dwarf\+\_\+\+Handler}}}]{dw\+\_\+errhand}{, }\item[{\doxymbox{\hyperlink{group__basicdatatypes_ga376c1939313af42401fc67bc998fdd2c}{Dwarf\+\_\+\+Ptr}}}]{dw\+\_\+errarg}{, }\item[{\doxymbox{\hyperlink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\+\_\+\+Debug}} \texorpdfstring{$\ast$}{*}}]{dw\+\_\+dbg}{, }\item[{\doxymbox{\hyperlink{group__allstructs_ga8d4fac0e48040b6ca91e06ffda09766a}{Dwarf\+\_\+\+Error}} \texorpdfstring{$\ast$}{*}}]{dw\+\_\+error}{}\end{DoxyParamCaption})}



Initialization based on path. 

This identical to \doxylink{group__initfunctions_ga8970fc7d21c9bfe1e7b33fe86579dd3d}{dwarf\+\_\+init\+\_\+path()} except that it adds a new argument, dw\+\_\+universalnumber, with which you can specify which object in a Mach-\/O universal binary you wish to open.

It is always safe and appropriate to pass zero as the dw\+\_\+universalnumber. Elf and PE and (non-\/universal) Mach-\/O object files ignore the value of dw\+\_\+universalnumber. \Hypertarget{group__initfunctions_ga8f0107a24ee3013be3f4853295800ff4}\index{Libdwarf Initialization Functions@{Libdwarf Initialization Functions}!dwarf\_init\_path\_dl@{dwarf\_init\_path\_dl}}
\index{dwarf\_init\_path\_dl@{dwarf\_init\_path\_dl}!Libdwarf Initialization Functions@{Libdwarf Initialization Functions}}
\doxysubsubsection{\texorpdfstring{dwarf\_init\_path\_dl()}{dwarf\_init\_path\_dl()}}
{\footnotesize\ttfamily \label{group__initfunctions_ga8f0107a24ee3013be3f4853295800ff4} 
DW\+\_\+\+API int dwarf\+\_\+init\+\_\+path\+\_\+dl (\begin{DoxyParamCaption}\item[{const char \texorpdfstring{$\ast$}{*}}]{dw\+\_\+path}{, }\item[{char \texorpdfstring{$\ast$}{*}}]{dw\+\_\+true\+\_\+path\+\_\+out\+\_\+buffer}{, }\item[{unsigned int}]{dw\+\_\+true\+\_\+path\+\_\+bufferlen}{, }\item[{unsigned int}]{dw\+\_\+groupnumber}{, }\item[{\doxymbox{\hyperlink{group__allstructs_ga6de1c2929cebfae36804315f7232cb19}{Dwarf\+\_\+\+Handler}}}]{dw\+\_\+errhand}{, }\item[{\doxymbox{\hyperlink{group__basicdatatypes_ga376c1939313af42401fc67bc998fdd2c}{Dwarf\+\_\+\+Ptr}}}]{dw\+\_\+errarg}{, }\item[{\doxymbox{\hyperlink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\+\_\+\+Debug}} \texorpdfstring{$\ast$}{*}}]{dw\+\_\+dbg}{, }\item[{char \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}}]{dw\+\_\+dl\+\_\+path\+\_\+array}{, }\item[{unsigned int}]{dw\+\_\+dl\+\_\+path\+\_\+array\+\_\+size}{, }\item[{unsigned char \texorpdfstring{$\ast$}{*}}]{dw\+\_\+dl\+\_\+path\+\_\+source}{, }\item[{\doxymbox{\hyperlink{group__allstructs_ga8d4fac0e48040b6ca91e06ffda09766a}{Dwarf\+\_\+\+Error}} \texorpdfstring{$\ast$}{*}}]{dw\+\_\+error}{}\end{DoxyParamCaption})}



Initialization following GNU debuglink section data. 

Sets the true-\/path with DWARF if there is appropriate debuglink data available.

In case DW\+\_\+\+DLV\+\_\+\+ERROR returned be sure to call dwarf\+\_\+dealloc\+\_\+error even though the returned \doxylink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\+\_\+\+Debug} is NULL.


\begin{DoxyParams}{Parameters}
{\em dw\+\_\+path} & Pass in the path to the object file to open. \\
\hline
{\em dw\+\_\+true\+\_\+path\+\_\+out\+\_\+buffer} & Pass in NULL or the name of a string buffer. \\
\hline
{\em dw\+\_\+true\+\_\+path\+\_\+bufferlen} & Pass in the length in bytes of the buffer. \\
\hline
{\em dw\+\_\+groupnumber} & The value passed in should be DW\+\_\+\+GROUPNUMBER\+\_\+\+ANY unless one wishes to other than a standard group. \\
\hline
{\em dw\+\_\+errhand} & Pass in NULL, normally. If non-\/null one wishes libdwarf to call this error handling function (which you must write) instead of passing meaningful values to the dw\+\_\+error argument. \\
\hline
{\em dw\+\_\+errarg} & Pass in NULL, normally. If dw\+\_\+errorhand is non-\/null, then this value (a pointer or integer that means something to you) is passed to the dw\+\_\+errhand function in case that is helpful to you. \\
\hline
{\em dw\+\_\+dbg} & On success, \texorpdfstring{$\ast$}{*}dw\+\_\+dbg is set to a pointer to a new \doxylink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\+\_\+\+Debug} structure to be used in calls to libdwarf functions. \\
\hline
{\em dw\+\_\+dl\+\_\+path\+\_\+array} & debuglink processing allows a user-\/specified set of file paths and this argument allows one to specify these. Pass in a pointer to array of pointers to strings which you, the caller, have filled in. The strings should be alternate paths (see the GNU debuglink documentation.) \\
\hline
{\em dw\+\_\+dl\+\_\+path\+\_\+array\+\_\+size} & Specify the size of the dw\+\_\+dl\+\_\+path\+\_\+array. \\
\hline
{\em dw\+\_\+dl\+\_\+path\+\_\+source} & returns DW\+\_\+\+PATHSOURCE\+\_\+basic or other such value so the caller can know how the true-\/path was resolved. \\
\hline
{\em dw\+\_\+error} & In case return is DW\+\_\+\+DLV\+\_\+\+ERROR dw\+\_\+error is set to point to the error details. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
DW\+\_\+\+DLV\+\_\+\+OK etc.
\end{DoxyReturn}
\doxylink{index_dwsec_separatedebug}{Details on separate DWARF object access } \begin{DoxySeeAlso}{See also}
\doxylink{group__exampleinit__dl}{Using dwarf\+\_\+init\+\_\+path\+\_\+dl()} 
\end{DoxySeeAlso}
\Hypertarget{group__initfunctions_ga62b9292c851fd242e18f9716c1d6e3b8}\index{Libdwarf Initialization Functions@{Libdwarf Initialization Functions}!dwarf\_init\_path\_dl\_a@{dwarf\_init\_path\_dl\_a}}
\index{dwarf\_init\_path\_dl\_a@{dwarf\_init\_path\_dl\_a}!Libdwarf Initialization Functions@{Libdwarf Initialization Functions}}
\doxysubsubsection{\texorpdfstring{dwarf\_init\_path\_dl\_a()}{dwarf\_init\_path\_dl\_a()}}
{\footnotesize\ttfamily \label{group__initfunctions_ga62b9292c851fd242e18f9716c1d6e3b8} 
DW\+\_\+\+API int dwarf\+\_\+init\+\_\+path\+\_\+dl\+\_\+a (\begin{DoxyParamCaption}\item[{const char \texorpdfstring{$\ast$}{*}}]{dw\+\_\+path}{, }\item[{char \texorpdfstring{$\ast$}{*}}]{dw\+\_\+true\+\_\+path\+\_\+out\+\_\+buffer}{, }\item[{unsigned int}]{dw\+\_\+true\+\_\+path\+\_\+bufferlen}{, }\item[{unsigned int}]{dw\+\_\+groupnumber}{, }\item[{unsigned int}]{dw\+\_\+universalnumber}{, }\item[{\doxymbox{\hyperlink{group__allstructs_ga6de1c2929cebfae36804315f7232cb19}{Dwarf\+\_\+\+Handler}}}]{dw\+\_\+errhand}{, }\item[{\doxymbox{\hyperlink{group__basicdatatypes_ga376c1939313af42401fc67bc998fdd2c}{Dwarf\+\_\+\+Ptr}}}]{dw\+\_\+errarg}{, }\item[{\doxymbox{\hyperlink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\+\_\+\+Debug}} \texorpdfstring{$\ast$}{*}}]{dw\+\_\+dbg}{, }\item[{char \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}}]{dw\+\_\+dl\+\_\+path\+\_\+array}{, }\item[{unsigned int}]{dw\+\_\+dl\+\_\+path\+\_\+array\+\_\+size}{, }\item[{unsigned char \texorpdfstring{$\ast$}{*}}]{dw\+\_\+dl\+\_\+path\+\_\+source}{, }\item[{\doxymbox{\hyperlink{group__allstructs_ga8d4fac0e48040b6ca91e06ffda09766a}{Dwarf\+\_\+\+Error}} \texorpdfstring{$\ast$}{*}}]{dw\+\_\+error}{}\end{DoxyParamCaption})}



Initialization based on path with debuglink. 

This identical to \doxylink{group__initfunctions_ga8f0107a24ee3013be3f4853295800ff4}{dwarf\+\_\+init\+\_\+path\+\_\+dl()} except that it adds a new argument, dw\+\_\+universalnumber, with which you can specify which object in a Mach-\/O universal binary you wish to open.

It is always safe and appropriate to pass zero as the dw\+\_\+universalnumber. Elf and PE and (non-\/universal) Mach-\/O object files ignore the value of dw\+\_\+universalnumber.

Mach-\/O objects do not contain or use debuglink data. \Hypertarget{group__initfunctions_ga33dd7f21bad8725f5878e73e3c671fd9}\index{Libdwarf Initialization Functions@{Libdwarf Initialization Functions}!dwarf\_object\_finish@{dwarf\_object\_finish}}
\index{dwarf\_object\_finish@{dwarf\_object\_finish}!Libdwarf Initialization Functions@{Libdwarf Initialization Functions}}
\doxysubsubsection{\texorpdfstring{dwarf\_object\_finish()}{dwarf\_object\_finish()}}
{\footnotesize\ttfamily \label{group__initfunctions_ga33dd7f21bad8725f5878e73e3c671fd9} 
DW\+\_\+\+API int dwarf\+\_\+object\+\_\+finish (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\+\_\+\+Debug}}}]{dw\+\_\+dbg}{}\end{DoxyParamCaption})}



Used to close the object\+\_\+init dw\+\_\+dbg. 

Close the dw\+\_\+dbg opened by \doxylink{group__initfunctions_ga44350f3d6a177c86332cdbb30fa78d9e}{dwarf\+\_\+object\+\_\+init\+\_\+b()}.


\begin{DoxyParams}{Parameters}
{\em dw\+\_\+dbg} & Must be an open \doxylink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\+\_\+\+Debug} opened by \doxylink{group__initfunctions_ga44350f3d6a177c86332cdbb30fa78d9e}{dwarf\+\_\+object\+\_\+init\+\_\+b()}. The init call dw\+\_\+obj data is not freed by the call to dwarf\+\_\+object\+\_\+finish. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The return value DW\+\_\+\+DLV\+\_\+\+OK etc is useless, one could possibly report it somehow. Callers usually ignore the return value. 
\end{DoxyReturn}
\Hypertarget{group__initfunctions_ga44350f3d6a177c86332cdbb30fa78d9e}\index{Libdwarf Initialization Functions@{Libdwarf Initialization Functions}!dwarf\_object\_init\_b@{dwarf\_object\_init\_b}}
\index{dwarf\_object\_init\_b@{dwarf\_object\_init\_b}!Libdwarf Initialization Functions@{Libdwarf Initialization Functions}}
\doxysubsubsection{\texorpdfstring{dwarf\_object\_init\_b()}{dwarf\_object\_init\_b()}}
{\footnotesize\ttfamily \label{group__initfunctions_ga44350f3d6a177c86332cdbb30fa78d9e} 
DW\+\_\+\+API int dwarf\+\_\+object\+\_\+init\+\_\+b (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{group__allstructs_ga80e90b3f3f60f28d0098a1e0cd6cb371}{Dwarf\+\_\+\+Obj\+\_\+\+Access\+\_\+\+Interface\+\_\+a}} \texorpdfstring{$\ast$}{*}}]{dw\+\_\+obj}{, }\item[{\doxymbox{\hyperlink{group__allstructs_ga6de1c2929cebfae36804315f7232cb19}{Dwarf\+\_\+\+Handler}}}]{dw\+\_\+errhand}{, }\item[{\doxymbox{\hyperlink{group__basicdatatypes_ga376c1939313af42401fc67bc998fdd2c}{Dwarf\+\_\+\+Ptr}}}]{dw\+\_\+errarg}{, }\item[{unsigned int}]{dw\+\_\+groupnumber}{, }\item[{\doxymbox{\hyperlink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\+\_\+\+Debug}} \texorpdfstring{$\ast$}{*}}]{dw\+\_\+dbg}{, }\item[{\doxymbox{\hyperlink{group__allstructs_ga8d4fac0e48040b6ca91e06ffda09766a}{Dwarf\+\_\+\+Error}} \texorpdfstring{$\ast$}{*}}]{dw\+\_\+error}{}\end{DoxyParamCaption})}



Used to access DWARF information in memory or in an object format unknown to libdwarf. 

In case DW\+\_\+\+DLV\+\_\+\+ERROR returned be sure to call dwarf\+\_\+dealloc\+\_\+error even though the returned \doxylink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\+\_\+\+Debug} is NULL.

Since libdwarf is not reading the object directly in this case it us up to the code actually reading the object to check the object file for format and do sufficient format-\/specific checks for correctness and return DW\+\_\+\+DLV\+\_\+\+ERROR if object checks fail.

\begin{DoxySeeAlso}{See also}
userobjread \doxylink{jitreader_8c}{src/\+bin/\+dwarfexample/\+jitreader.\+c}
\end{DoxySeeAlso}

\begin{DoxyParams}{Parameters}
{\em dw\+\_\+obj} & A data structure filled out by the caller so libdwarf can access DWARF data not in a supported object file format. \\
\hline
{\em dw\+\_\+errhand} & Pass in NULL normally. \\
\hline
{\em dw\+\_\+groupnumber} & The value passed in should be DW\+\_\+\+GROUPNUMBER\+\_\+\+ANY unless one wishes to other than a standard group (quite unlikely for this interface). \\
\hline
{\em dw\+\_\+dbg} & On success, \texorpdfstring{$\ast$}{*}dw\+\_\+dbg is set to a pointer to a new \doxylink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\+\_\+\+Debug} structure to be used in calls to libdwarf functions. \\
\hline
{\em dw\+\_\+error} & In case return is DW\+\_\+\+DLV\+\_\+\+ERROR dw\+\_\+error is set to point to the error details. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The usual value:\+ DW\+\_\+\+DLV\+\_\+\+OK etc. 
\end{DoxyReturn}
\Hypertarget{group__initfunctions_ga4d7ccb86c49acbff43dc0fe2ad87068e}\index{Libdwarf Initialization Functions@{Libdwarf Initialization Functions}!dwarf\_set\_tied\_dbg@{dwarf\_set\_tied\_dbg}}
\index{dwarf\_set\_tied\_dbg@{dwarf\_set\_tied\_dbg}!Libdwarf Initialization Functions@{Libdwarf Initialization Functions}}
\doxysubsubsection{\texorpdfstring{dwarf\_set\_tied\_dbg()}{dwarf\_set\_tied\_dbg()}}
{\footnotesize\ttfamily \label{group__initfunctions_ga4d7ccb86c49acbff43dc0fe2ad87068e} 
DW\+\_\+\+API int dwarf\+\_\+set\+\_\+tied\+\_\+dbg (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\+\_\+\+Debug}}}]{dw\+\_\+split\+\_\+dbg}{, }\item[{\doxymbox{\hyperlink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\+\_\+\+Debug}}}]{dw\+\_\+tied\+\_\+dbg}{, }\item[{\doxymbox{\hyperlink{group__allstructs_ga8d4fac0e48040b6ca91e06ffda09766a}{Dwarf\+\_\+\+Error}} \texorpdfstring{$\ast$}{*}}]{dw\+\_\+error}{}\end{DoxyParamCaption})}



Use with split dwarf. 

In libdwarf usage the object file being reported on \+[a]\+ is opened with \doxylink{group__initfunctions_ga8970fc7d21c9bfe1e7b33fe86579dd3d}{dwarf\+\_\+init\+\_\+path()} or the like. If that object file \+[a]\+ is a split-\/dwarf object then important data needed to report all of what is in the object file \+[a]\+ needs an open \doxylink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\+\_\+\+Debug} on the base object file \+[b]\+ (usually the base executable object). Here we call that executable object file \+[b]\+ the {\itshape tied} object.

See DWARF5 Appendix F.


\begin{DoxyParams}{Parameters}
{\em dw\+\_\+split\+\_\+dbg} & Pass in an open dbg, on a split-\/dwarf object file with (normally) lots of DWARF but no executable code. \\
\hline
{\em dw\+\_\+tied\+\_\+dbg} & Pass in an open dbg on an executable (we call it a {\itshape tied} dbg here) which has minimal DWARF (to save space in the executable). \\
\hline
{\em dw\+\_\+error} & In case return is DW\+\_\+\+DLV\+\_\+\+ERROR dw\+\_\+error is set to point to the error details. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
DW\+\_\+\+DLV\+\_\+\+OK etc.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxylink{group__example2}{Attaching a tied dbg} 

\doxylink{group__example3}{Detaching a tied dbg} 
\end{DoxySeeAlso}
