\doxysection{Reading a location expression }
\hypertarget{group__example__locexprc}{}\label{group__example__locexprc}\index{Reading a location expression@{Reading a location expression}}


Example getting details of a location expression.  


Example getting details of a location expression. 

\begin{DoxySeeAlso}{See also}
\doxylink{group__example__loclistcv5}{Location/\+expression access}
\end{DoxySeeAlso}

\begin{DoxyCode}{0}
\DoxyCodeLine{*/}
\DoxyCodeLine{\textcolor{keywordtype}{int}\ example\_locexprc(\doxymbox{\hyperlink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\_Debug}}\ dbg,\doxymbox{\hyperlink{group__basicdatatypes_ga376c1939313af42401fc67bc998fdd2c}{Dwarf\_Ptr}}\ expr\_bytes,}
\DoxyCodeLine{\ \ \ \ \doxymbox{\hyperlink{group__basicdatatypes_ga5de64bb9627534a24dcbccc327916265}{Dwarf\_Unsigned}}\ expr\_len,}
\DoxyCodeLine{\ \ \ \ \doxymbox{\hyperlink{group__basicdatatypes_ga4fb2b14ce7a6d27321fa7999b46b82bd}{Dwarf\_Half}}\ addr\_size,}
\DoxyCodeLine{\ \ \ \ \doxymbox{\hyperlink{group__basicdatatypes_ga4fb2b14ce7a6d27321fa7999b46b82bd}{Dwarf\_Half}}\ offset\_size,}
\DoxyCodeLine{\ \ \ \ \doxymbox{\hyperlink{group__basicdatatypes_ga4fb2b14ce7a6d27321fa7999b46b82bd}{Dwarf\_Half}}\ version,}
\DoxyCodeLine{\ \ \ \ \doxymbox{\hyperlink{group__allstructs_ga8d4fac0e48040b6ca91e06ffda09766a}{Dwarf\_Error}}*error)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \ \doxymbox{\hyperlink{group__allstructs_ga77e23e9624ff0b22ed747913f294fd25}{Dwarf\_Loc\_Head\_c}}\ head\ =\ 0;}
\DoxyCodeLine{\ \ \ \ \doxymbox{\hyperlink{group__allstructs_gabcb72d212aafc296a1fe1bb92689e9b8}{Dwarf\_Locdesc\_c}}\ \ locentry\ =\ 0;}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordtype}{int}\ \ \ \ \ \ \ \ \ \ \ \ res2\ =\ 0;}
\DoxyCodeLine{\ \ \ \ \doxymbox{\hyperlink{group__basicdatatypes_ga5de64bb9627534a24dcbccc327916265}{Dwarf\_Unsigned}}\ rawlopc\ =\ 0;}
\DoxyCodeLine{\ \ \ \ \doxymbox{\hyperlink{group__basicdatatypes_ga5de64bb9627534a24dcbccc327916265}{Dwarf\_Unsigned}}\ rawhipc\ =\ 0;}
\DoxyCodeLine{\ \ \ \ \doxymbox{\hyperlink{group__basicdatatypes_ga32afecc94a71aae2be36aa279f1dded8}{Dwarf\_Bool}}\ \ \ \ \ debug\_addr\_unavail\ =\ FALSE;}
\DoxyCodeLine{\ \ \ \ \doxymbox{\hyperlink{group__basicdatatypes_ga5de64bb9627534a24dcbccc327916265}{Dwarf\_Unsigned}}\ lopc\ =\ 0;}
\DoxyCodeLine{\ \ \ \ \doxymbox{\hyperlink{group__basicdatatypes_ga5de64bb9627534a24dcbccc327916265}{Dwarf\_Unsigned}}\ hipc\ =\ 0;}
\DoxyCodeLine{\ \ \ \ \doxymbox{\hyperlink{group__basicdatatypes_ga5de64bb9627534a24dcbccc327916265}{Dwarf\_Unsigned}}\ ulistlen\ =\ 0;}
\DoxyCodeLine{\ \ \ \ \doxymbox{\hyperlink{group__basicdatatypes_ga5de64bb9627534a24dcbccc327916265}{Dwarf\_Unsigned}}\ ulocentry\_count\ =\ 0;}
\DoxyCodeLine{\ \ \ \ \doxymbox{\hyperlink{group__basicdatatypes_ga5de64bb9627534a24dcbccc327916265}{Dwarf\_Unsigned}}\ section\_offset\ =\ 0;}
\DoxyCodeLine{\ \ \ \ \doxymbox{\hyperlink{group__basicdatatypes_ga5de64bb9627534a24dcbccc327916265}{Dwarf\_Unsigned}}\ locdesc\_offset\ =\ 0;}
\DoxyCodeLine{\ \ \ \ \doxymbox{\hyperlink{group__basicdatatypes_ga52e439e652a1a30277679f64f83cc0fe}{Dwarf\_Small}}\ \ \ \ lle\_value\ =\ 0;}
\DoxyCodeLine{\ \ \ \ \doxymbox{\hyperlink{group__basicdatatypes_ga52e439e652a1a30277679f64f83cc0fe}{Dwarf\_Small}}\ \ \ \ loclist\_source\ =\ 0;}
\DoxyCodeLine{\ \ \ \ \doxymbox{\hyperlink{group__basicdatatypes_ga5de64bb9627534a24dcbccc327916265}{Dwarf\_Unsigned}}\ i\ =\ 0;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ res2\ =\ \doxymbox{\hyperlink{group__locations_ga2061570ef695cfd9aa71e428845fef37}{dwarf\_loclist\_from\_expr\_c}}(dbg,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ expr\_bytes,expr\_len,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ addr\_size,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ offset\_size,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ version,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \&head,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \&ulistlen,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ error);}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{if}\ (res2\ !=\ DW\_DLV\_OK)\ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ res2;}
\DoxyCodeLine{\ \ \ \ \}}
\DoxyCodeLine{\ \ \ \ \textcolor{comment}{/*\ \ These\ are\ a\ location\ expression,\ not\ loclist.}}
\DoxyCodeLine{\textcolor{comment}{\ \ \ \ \ \ \ \ So\ we\ just\ need\ the\ 0th\ entry.\ }}

\end{DoxyCode}
