\doxysection{Using dwarf\+\_\+attrlist() }
\hypertarget{group__example1}{}\label{group__example1}\index{Using dwarf\_attrlist()@{Using dwarf\_attrlist()}}


Example showing \doxylink{group__attrform_gaa7eacb8230fa31cc568e627c5f0573f6}{dwarf\+\_\+attrlist()}.  


Example showing \doxylink{group__attrform_gaa7eacb8230fa31cc568e627c5f0573f6}{dwarf\+\_\+attrlist()}. 


\begin{DoxyParams}{Parameters}
{\em somedie} & Pass in any valid relevant DIE pointer. \\
\hline
{\em error} & An error pointer we can use. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Return DW\+\_\+\+DLV\+\_\+\+OK (etc).
\end{DoxyReturn}

\begin{DoxyCode}{0}
\DoxyCodeLine{*/}
\DoxyCodeLine{\textcolor{keywordtype}{int}\ example1(\doxymbox{\hyperlink{group__allstructs_ga3a3759c3047d78dba9f590d5e5893be5}{Dwarf\_Die}}\ somedie,\doxymbox{\hyperlink{group__allstructs_ga8d4fac0e48040b6ca91e06ffda09766a}{Dwarf\_Error}}\ *error)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \ \doxymbox{\hyperlink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\_Debug}}\ dbg\ =\ 0;}
\DoxyCodeLine{\ \ \ \ \doxymbox{\hyperlink{group__basicdatatypes_gac91d9490d58c8d86a4d5b63ca93ba6dd}{Dwarf\_Signed}}\ atcount;}
\DoxyCodeLine{\ \ \ \ \doxymbox{\hyperlink{group__allstructs_ga3b8f8b4e43653647a2face222040a915}{Dwarf\_Attribute}}\ *atlist;}
\DoxyCodeLine{\ \ \ \ \doxymbox{\hyperlink{group__basicdatatypes_gac91d9490d58c8d86a4d5b63ca93ba6dd}{Dwarf\_Signed}}\ i\ =\ 0;}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordtype}{int}\ errv;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ errv\ =\ \doxymbox{\hyperlink{group__attrform_gaa7eacb8230fa31cc568e627c5f0573f6}{dwarf\_attrlist}}(somedie,\ \&atlist,\&atcount,\ error);}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{if}\ (errv\ !=\ DW\_DLV\_OK)\ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ errv;}
\DoxyCodeLine{\ \ \ \ \}}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{for}\ (i\ =\ 0;\ i\ <\ atcount;\ ++i)\ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \doxymbox{\hyperlink{group__basicdatatypes_ga4fb2b14ce7a6d27321fa7999b46b82bd}{Dwarf\_Half}}\ attrnum\ =\ 0;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *attrname\ =\ 0;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{comment}{/*\ \ use\ atlist[i],\ likely\ calling}}
\DoxyCodeLine{\textcolor{comment}{\ \ \ \ \ \ \ \ \ \ \ \ libdwarf\ functions\ and\ likely}}
\DoxyCodeLine{\textcolor{comment}{\ \ \ \ \ \ \ \ \ \ \ \ returning\ DW\_DLV\_ERROR\ if}}
\DoxyCodeLine{\textcolor{comment}{\ \ \ \ \ \ \ \ \ \ \ \ what\ you\ call\ gets\ DW\_DLV\_ERROR\ }}

\end{DoxyCode}
