\doxysection{Using dwarf\+\_\+get\+\_\+globals() }
\hypertarget{group__examplef}{}\label{group__examplef}\index{Using dwarf\_get\_globals()@{Using dwarf\_get\_globals()}}


Example using global symbol names.  


Example using global symbol names. 

For 0.\+4.\+2 and earlier this returned .debug\+\_\+pubnames content. As of version 0.\+5.\+0 (October 2022) this returns .debug\+\_\+pubnames (if it exists) and the relevant portion of .debug\+\_\+names (if .debug\+\_\+names exists) data.


\begin{DoxyCode}{0}
\DoxyCodeLine{*/}
\DoxyCodeLine{\textcolor{keywordtype}{int}\ examplef(\doxymbox{\hyperlink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\_Debug}}\ dbg,\doxymbox{\hyperlink{group__allstructs_ga8d4fac0e48040b6ca91e06ffda09766a}{Dwarf\_Error}}\ *error)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \ \doxymbox{\hyperlink{group__basicdatatypes_gac91d9490d58c8d86a4d5b63ca93ba6dd}{Dwarf\_Signed}}\ \ count\ =\ 0;}
\DoxyCodeLine{\ \ \ \ \doxymbox{\hyperlink{group__allstructs_ga59a6e779b3b390cf4f234c9edee87008}{Dwarf\_Global}}\ *globs\ =\ 0;}
\DoxyCodeLine{\ \ \ \ \doxymbox{\hyperlink{group__basicdatatypes_gac91d9490d58c8d86a4d5b63ca93ba6dd}{Dwarf\_Signed}}\ \ i\ =\ 0;}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordtype}{int}\ \ \ \ \ \ \ \ \ \ \ res\ =\ 0;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ res\ =\ \doxymbox{\hyperlink{group__pubnames_ga9143be4ff0556383af3a5e4c2de87fff}{dwarf\_get\_globals}}(dbg,\ \&globs,\&count,\ error);}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{if}\ (res\ !=\ DW\_DLV\_OK)\ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ res;}
\DoxyCodeLine{\ \ \ \ \}}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{for}\ (i\ =\ 0;\ i\ <\ count;\ ++i)\ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{comment}{/*\ use\ globs[i]\ }}

\end{DoxyCode}
