\doxysection{Reading the gdbindex symbol table }
\hypertarget{group__examplex}{}\label{group__examplex}\index{Reading the gdbindex symbol table@{Reading the gdbindex symbol table}}


Example accessing gdbindex symbol table data.  


Example accessing gdbindex symbol table data. 


\begin{DoxyCode}{0}
\DoxyCodeLine{*/}
\DoxyCodeLine{\textcolor{keywordtype}{int}\ examplex(\doxymbox{\hyperlink{group__allstructs_gaf91021d6b3f6bf39f5c43c8dbe1a9591}{Dwarf\_Gdbindex}}\ gdbindex,\doxymbox{\hyperlink{group__allstructs_ga8d4fac0e48040b6ca91e06ffda09766a}{Dwarf\_Error}}*error)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \ \doxymbox{\hyperlink{group__basicdatatypes_ga5de64bb9627534a24dcbccc327916265}{Dwarf\_Unsigned}}\ symtab\_list\_length\ =\ 0;}
\DoxyCodeLine{\ \ \ \ \doxymbox{\hyperlink{group__basicdatatypes_ga5de64bb9627534a24dcbccc327916265}{Dwarf\_Unsigned}}\ i\ =\ 0;}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordtype}{int}\ \ \ \ \ \ \ \ \ \ \ \ res\ =\ 0;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ res\ =\ \doxymbox{\hyperlink{group__gdbindex_ga8c85a738d917ab70b05d8d8161db747d}{dwarf\_gdbindex\_symboltable\_array}}(gdbindex,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \&symtab\_list\_length,error);}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{if}\ (res\ !=\ DW\_DLV\_OK)\ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ res;}
\DoxyCodeLine{\ \ \ \ \}}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{for}\ (i\ \ =\ 0;\ i\ <\ symtab\_list\_length;\ i++)\ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \doxymbox{\hyperlink{group__basicdatatypes_ga5de64bb9627534a24dcbccc327916265}{Dwarf\_Unsigned}}\ symnameoffset\ =\ 0;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \doxymbox{\hyperlink{group__basicdatatypes_ga5de64bb9627534a24dcbccc327916265}{Dwarf\_Unsigned}}\ cuvecoffset\ =\ 0;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \doxymbox{\hyperlink{group__basicdatatypes_ga5de64bb9627534a24dcbccc327916265}{Dwarf\_Unsigned}}\ cuvec\_len\ =\ 0;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \doxymbox{\hyperlink{group__basicdatatypes_ga5de64bb9627534a24dcbccc327916265}{Dwarf\_Unsigned}}\ ii\ =\ 0;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *name\ =\ 0;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ resl\ =\ 0;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ resl\ =\ \doxymbox{\hyperlink{group__gdbindex_ga0aacc8a71ef1954e389dcdb9527ecb8e}{dwarf\_gdbindex\_symboltable\_entry}}(gdbindex,i,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \&symnameoffset,\&cuvecoffset,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ error);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (resl\ !=\ DW\_DLV\_OK)\ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ resl;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\ \ \ \ \ \ \ \ resl\ =\ \doxymbox{\hyperlink{group__gdbindex_ga1d631714b898e715c9525a127d9c37ce}{dwarf\_gdbindex\_string\_by\_offset}}(gdbindex,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ symnameoffset,\&name,error);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (resl\ !=\ DW\_DLV\_OK)\ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ resl;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\ \ \ \ \ \ \ \ resl\ =\ \doxymbox{\hyperlink{group__gdbindex_ga94743559f16e7c1ce01f960316a6a3f5}{dwarf\_gdbindex\_cuvector\_length}}(gdbindex,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ cuvecoffset,\&cuvec\_len,error);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (resl\ !=\ DW\_DLV\_OK)\ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ resl;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (ii\ =\ 0;\ ii\ <\ cuvec\_len;\ ++ii\ )\ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{group__basicdatatypes_ga5de64bb9627534a24dcbccc327916265}{Dwarf\_Unsigned}}\ attributes\ =\ 0;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{group__basicdatatypes_ga5de64bb9627534a24dcbccc327916265}{Dwarf\_Unsigned}}\ cu\_index\ =\ 0;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{group__basicdatatypes_ga5de64bb9627534a24dcbccc327916265}{Dwarf\_Unsigned}}\ symbol\_kind\ =\ 0;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{group__basicdatatypes_ga5de64bb9627534a24dcbccc327916265}{Dwarf\_Unsigned}}\ is\_static\ =\ 0;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ res2\ =\ 0;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ res2\ =\ \doxymbox{\hyperlink{group__gdbindex_ga5f4e3289d0ea7ea955636ff0c1109579}{dwarf\_gdbindex\_cuvector\_inner\_attributes}}(}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ gdbindex,cuvecoffset,ii,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \&attributes,error);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (res2\ !=\ DW\_DLV\_OK)\ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ res2;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ \ 'attributes'\ is\ a\ value\ with\ various\ internal}}
\DoxyCodeLine{\textcolor{comment}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ fields\ so\ we\ expand\ the\ fields.\ }}

\end{DoxyCode}
