\doxysection{Fast Access to a CU given a code address }
\hypertarget{group__aranges}{}\label{group__aranges}\index{Fast Access to a CU given a code address@{Fast Access to a CU given a code address}}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
DW\+\_\+\+API int \doxymbox{\hyperlink{group__aranges_ga68e5e48156c975501184aa9f5d6ffcc0}{dwarf\+\_\+get\+\_\+aranges}} (\doxymbox{\hyperlink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\+\_\+\+Debug}} dw\+\_\+dbg, \doxymbox{\hyperlink{group__allstructs_ga293719c19ccd6a950e3f104d3fc54ffa}{Dwarf\+\_\+\+Arange}} \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}dw\+\_\+aranges, \doxymbox{\hyperlink{group__basicdatatypes_gac91d9490d58c8d86a4d5b63ca93ba6dd}{Dwarf\+\_\+\+Signed}} \texorpdfstring{$\ast$}{*}dw\+\_\+arange\+\_\+count, \doxymbox{\hyperlink{group__allstructs_ga8d4fac0e48040b6ca91e06ffda09766a}{Dwarf\+\_\+\+Error}} \texorpdfstring{$\ast$}{*}dw\+\_\+error)
\begin{DoxyCompactList}\small\item\em Get access to CUs given code addresses. \end{DoxyCompactList}\item 
DW\+\_\+\+API int \doxymbox{\hyperlink{group__aranges_ga815732c2927dd67f76b195072e6adb54}{dwarf\+\_\+get\+\_\+arange}} (\doxymbox{\hyperlink{group__allstructs_ga293719c19ccd6a950e3f104d3fc54ffa}{Dwarf\+\_\+\+Arange}} \texorpdfstring{$\ast$}{*}dw\+\_\+aranges, \doxymbox{\hyperlink{group__basicdatatypes_ga5de64bb9627534a24dcbccc327916265}{Dwarf\+\_\+\+Unsigned}} dw\+\_\+arange\+\_\+count, \doxymbox{\hyperlink{group__basicdatatypes_ga16ddc0e584ea1a17237ccf1617f31075}{Dwarf\+\_\+\+Addr}} dw\+\_\+address, \doxymbox{\hyperlink{group__allstructs_ga293719c19ccd6a950e3f104d3fc54ffa}{Dwarf\+\_\+\+Arange}} \texorpdfstring{$\ast$}{*}dw\+\_\+returned\+\_\+arange, \doxymbox{\hyperlink{group__allstructs_ga8d4fac0e48040b6ca91e06ffda09766a}{Dwarf\+\_\+\+Error}} \texorpdfstring{$\ast$}{*}dw\+\_\+error)
\begin{DoxyCompactList}\small\item\em Find a range given a code address. \end{DoxyCompactList}\item 
DW\+\_\+\+API int \doxymbox{\hyperlink{group__aranges_gad91d58577efcfca0864adcaadd44ffa1}{dwarf\+\_\+get\+\_\+cu\+\_\+die\+\_\+offset}} (\doxymbox{\hyperlink{group__allstructs_ga293719c19ccd6a950e3f104d3fc54ffa}{Dwarf\+\_\+\+Arange}} dw\+\_\+arange, \doxymbox{\hyperlink{group__basicdatatypes_ga08c706887ae8c6e09e8f0fb5dd9a539e}{Dwarf\+\_\+\+Off}} \texorpdfstring{$\ast$}{*}dw\+\_\+return\+\_\+offset, \doxymbox{\hyperlink{group__allstructs_ga8d4fac0e48040b6ca91e06ffda09766a}{Dwarf\+\_\+\+Error}} \texorpdfstring{$\ast$}{*}dw\+\_\+error)
\begin{DoxyCompactList}\small\item\em Given an arange return its CU DIE offset. \end{DoxyCompactList}\item 
DW\+\_\+\+API int \doxymbox{\hyperlink{group__aranges_gad81ac9568206bc9907afb00b826c401f}{dwarf\+\_\+get\+\_\+arange\+\_\+cu\+\_\+header\+\_\+offset}} (\doxymbox{\hyperlink{group__allstructs_ga293719c19ccd6a950e3f104d3fc54ffa}{Dwarf\+\_\+\+Arange}} dw\+\_\+arange, \doxymbox{\hyperlink{group__basicdatatypes_ga08c706887ae8c6e09e8f0fb5dd9a539e}{Dwarf\+\_\+\+Off}} \texorpdfstring{$\ast$}{*}dw\+\_\+return\+\_\+cu\+\_\+header\+\_\+offset, \doxymbox{\hyperlink{group__allstructs_ga8d4fac0e48040b6ca91e06ffda09766a}{Dwarf\+\_\+\+Error}} \texorpdfstring{$\ast$}{*}dw\+\_\+error)
\begin{DoxyCompactList}\small\item\em Given an arange return its CU header offset. \end{DoxyCompactList}\item 
DW\+\_\+\+API int \doxymbox{\hyperlink{group__aranges_ga1cac47c75ac330e6e9e3230fcf7b1d88}{dwarf\+\_\+get\+\_\+arange\+\_\+info\+\_\+b}} (\doxymbox{\hyperlink{group__allstructs_ga293719c19ccd6a950e3f104d3fc54ffa}{Dwarf\+\_\+\+Arange}} dw\+\_\+arange, \doxymbox{\hyperlink{group__basicdatatypes_ga5de64bb9627534a24dcbccc327916265}{Dwarf\+\_\+\+Unsigned}} \texorpdfstring{$\ast$}{*}dw\+\_\+segment, \doxymbox{\hyperlink{group__basicdatatypes_ga5de64bb9627534a24dcbccc327916265}{Dwarf\+\_\+\+Unsigned}} \texorpdfstring{$\ast$}{*}dw\+\_\+segment\+\_\+entry\+\_\+size, \doxymbox{\hyperlink{group__basicdatatypes_ga16ddc0e584ea1a17237ccf1617f31075}{Dwarf\+\_\+\+Addr}} \texorpdfstring{$\ast$}{*}dw\+\_\+start, \doxymbox{\hyperlink{group__basicdatatypes_ga5de64bb9627534a24dcbccc327916265}{Dwarf\+\_\+\+Unsigned}} \texorpdfstring{$\ast$}{*}dw\+\_\+length, \doxymbox{\hyperlink{group__basicdatatypes_ga08c706887ae8c6e09e8f0fb5dd9a539e}{Dwarf\+\_\+\+Off}} \texorpdfstring{$\ast$}{*}dw\+\_\+cu\+\_\+die\+\_\+offset, \doxymbox{\hyperlink{group__allstructs_ga8d4fac0e48040b6ca91e06ffda09766a}{Dwarf\+\_\+\+Error}} \texorpdfstring{$\ast$}{*}dw\+\_\+error)
\begin{DoxyCompactList}\small\item\em Get the data in an arange entry. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}


\label{doc-func-members}
\Hypertarget{group__aranges_doc-func-members}
\doxysubsection{Function Documentation}
\Hypertarget{group__aranges_ga815732c2927dd67f76b195072e6adb54}\index{Fast Access to a CU given a code address@{Fast Access to a CU given a code address}!dwarf\_get\_arange@{dwarf\_get\_arange}}
\index{dwarf\_get\_arange@{dwarf\_get\_arange}!Fast Access to a CU given a code address@{Fast Access to a CU given a code address}}
\doxysubsubsection{\texorpdfstring{dwarf\_get\_arange()}{dwarf\_get\_arange()}}
{\footnotesize\ttfamily \label{group__aranges_ga815732c2927dd67f76b195072e6adb54} 
DW\+\_\+\+API int dwarf\+\_\+get\+\_\+arange (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{group__allstructs_ga293719c19ccd6a950e3f104d3fc54ffa}{Dwarf\+\_\+\+Arange}} \texorpdfstring{$\ast$}{*}}]{dw\+\_\+aranges}{, }\item[{\doxymbox{\hyperlink{group__basicdatatypes_ga5de64bb9627534a24dcbccc327916265}{Dwarf\+\_\+\+Unsigned}}}]{dw\+\_\+arange\+\_\+count}{, }\item[{\doxymbox{\hyperlink{group__basicdatatypes_ga16ddc0e584ea1a17237ccf1617f31075}{Dwarf\+\_\+\+Addr}}}]{dw\+\_\+address}{, }\item[{\doxymbox{\hyperlink{group__allstructs_ga293719c19ccd6a950e3f104d3fc54ffa}{Dwarf\+\_\+\+Arange}} \texorpdfstring{$\ast$}{*}}]{dw\+\_\+returned\+\_\+arange}{, }\item[{\doxymbox{\hyperlink{group__allstructs_ga8d4fac0e48040b6ca91e06ffda09766a}{Dwarf\+\_\+\+Error}} \texorpdfstring{$\ast$}{*}}]{dw\+\_\+error}{}\end{DoxyParamCaption})}



Find a range given a code address. 


\begin{DoxyParams}{Parameters}
{\em dw\+\_\+aranges} & Pass in a pointer to the first entry in the aranges array of pointers. \\
\hline
{\em dw\+\_\+arange\+\_\+count} & Pass in the dw\+\_\+arange\+\_\+count, the count for the array. \\
\hline
{\em dw\+\_\+address} & Pass in the code address of interest. \\
\hline
{\em dw\+\_\+returned\+\_\+arange} & On success, returns the particular arange that holds that address. \\
\hline
{\em dw\+\_\+error} & On error dw\+\_\+error is set to point to the error details. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The usual value:\+ DW\+\_\+\+DLV\+\_\+\+OK etc. Returns DW\+\_\+\+DLV\+\_\+\+NO\+\_\+\+ENTRY if there is no such code address present in the section. 
\end{DoxyReturn}
\Hypertarget{group__aranges_gad81ac9568206bc9907afb00b826c401f}\index{Fast Access to a CU given a code address@{Fast Access to a CU given a code address}!dwarf\_get\_arange\_cu\_header\_offset@{dwarf\_get\_arange\_cu\_header\_offset}}
\index{dwarf\_get\_arange\_cu\_header\_offset@{dwarf\_get\_arange\_cu\_header\_offset}!Fast Access to a CU given a code address@{Fast Access to a CU given a code address}}
\doxysubsubsection{\texorpdfstring{dwarf\_get\_arange\_cu\_header\_offset()}{dwarf\_get\_arange\_cu\_header\_offset()}}
{\footnotesize\ttfamily \label{group__aranges_gad81ac9568206bc9907afb00b826c401f} 
DW\+\_\+\+API int dwarf\+\_\+get\+\_\+arange\+\_\+cu\+\_\+header\+\_\+offset (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{group__allstructs_ga293719c19ccd6a950e3f104d3fc54ffa}{Dwarf\+\_\+\+Arange}}}]{dw\+\_\+arange}{, }\item[{\doxymbox{\hyperlink{group__basicdatatypes_ga08c706887ae8c6e09e8f0fb5dd9a539e}{Dwarf\+\_\+\+Off}} \texorpdfstring{$\ast$}{*}}]{dw\+\_\+return\+\_\+cu\+\_\+header\+\_\+offset}{, }\item[{\doxymbox{\hyperlink{group__allstructs_ga8d4fac0e48040b6ca91e06ffda09766a}{Dwarf\+\_\+\+Error}} \texorpdfstring{$\ast$}{*}}]{dw\+\_\+error}{}\end{DoxyParamCaption})}



Given an arange return its CU header offset. 


\begin{DoxyParams}{Parameters}
{\em dw\+\_\+arange} & The specific arange of interest. \\
\hline
{\em dw\+\_\+return\+\_\+cu\+\_\+header\+\_\+offset} & The CU header offset (in .debug\+\_\+info) applicable to this arange. \\
\hline
{\em dw\+\_\+error} & On 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__aranges_ga1cac47c75ac330e6e9e3230fcf7b1d88}\index{Fast Access to a CU given a code address@{Fast Access to a CU given a code address}!dwarf\_get\_arange\_info\_b@{dwarf\_get\_arange\_info\_b}}
\index{dwarf\_get\_arange\_info\_b@{dwarf\_get\_arange\_info\_b}!Fast Access to a CU given a code address@{Fast Access to a CU given a code address}}
\doxysubsubsection{\texorpdfstring{dwarf\_get\_arange\_info\_b()}{dwarf\_get\_arange\_info\_b()}}
{\footnotesize\ttfamily \label{group__aranges_ga1cac47c75ac330e6e9e3230fcf7b1d88} 
DW\+\_\+\+API int dwarf\+\_\+get\+\_\+arange\+\_\+info\+\_\+b (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{group__allstructs_ga293719c19ccd6a950e3f104d3fc54ffa}{Dwarf\+\_\+\+Arange}}}]{dw\+\_\+arange}{, }\item[{\doxymbox{\hyperlink{group__basicdatatypes_ga5de64bb9627534a24dcbccc327916265}{Dwarf\+\_\+\+Unsigned}} \texorpdfstring{$\ast$}{*}}]{dw\+\_\+segment}{, }\item[{\doxymbox{\hyperlink{group__basicdatatypes_ga5de64bb9627534a24dcbccc327916265}{Dwarf\+\_\+\+Unsigned}} \texorpdfstring{$\ast$}{*}}]{dw\+\_\+segment\+\_\+entry\+\_\+size}{, }\item[{\doxymbox{\hyperlink{group__basicdatatypes_ga16ddc0e584ea1a17237ccf1617f31075}{Dwarf\+\_\+\+Addr}} \texorpdfstring{$\ast$}{*}}]{dw\+\_\+start}{, }\item[{\doxymbox{\hyperlink{group__basicdatatypes_ga5de64bb9627534a24dcbccc327916265}{Dwarf\+\_\+\+Unsigned}} \texorpdfstring{$\ast$}{*}}]{dw\+\_\+length}{, }\item[{\doxymbox{\hyperlink{group__basicdatatypes_ga08c706887ae8c6e09e8f0fb5dd9a539e}{Dwarf\+\_\+\+Off}} \texorpdfstring{$\ast$}{*}}]{dw\+\_\+cu\+\_\+die\+\_\+offset}{, }\item[{\doxymbox{\hyperlink{group__allstructs_ga8d4fac0e48040b6ca91e06ffda09766a}{Dwarf\+\_\+\+Error}} \texorpdfstring{$\ast$}{*}}]{dw\+\_\+error}{}\end{DoxyParamCaption})}



Get the data in an arange entry. 


\begin{DoxyParams}{Parameters}
{\em dw\+\_\+arange} & The specific arange of interest. \\
\hline
{\em dw\+\_\+segment} & On success and if segment\+\_\+entry\+\_\+size is non-\/zero this returns the segment number from the arange. \\
\hline
{\em dw\+\_\+segment\+\_\+entry\+\_\+size} & On success returns the segment entry size from the arange. \\
\hline
{\em dw\+\_\+start} & On success returns the low address this arange refers to. \\
\hline
{\em dw\+\_\+length} & On success returns the length, in bytes of the code area this arange refers to. \\
\hline
{\em dw\+\_\+cu\+\_\+die\+\_\+offset} & On success returns the .debug\+\_\+info section offset the arange refers to. \\
\hline
{\em dw\+\_\+error} & On 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__aranges_ga68e5e48156c975501184aa9f5d6ffcc0}\index{Fast Access to a CU given a code address@{Fast Access to a CU given a code address}!dwarf\_get\_aranges@{dwarf\_get\_aranges}}
\index{dwarf\_get\_aranges@{dwarf\_get\_aranges}!Fast Access to a CU given a code address@{Fast Access to a CU given a code address}}
\doxysubsubsection{\texorpdfstring{dwarf\_get\_aranges()}{dwarf\_get\_aranges()}}
{\footnotesize\ttfamily \label{group__aranges_ga68e5e48156c975501184aa9f5d6ffcc0} 
DW\+\_\+\+API int dwarf\+\_\+get\+\_\+aranges (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\+\_\+\+Debug}}}]{dw\+\_\+dbg}{, }\item[{\doxymbox{\hyperlink{group__allstructs_ga293719c19ccd6a950e3f104d3fc54ffa}{Dwarf\+\_\+\+Arange}} \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}}]{dw\+\_\+aranges}{, }\item[{\doxymbox{\hyperlink{group__basicdatatypes_gac91d9490d58c8d86a4d5b63ca93ba6dd}{Dwarf\+\_\+\+Signed}} \texorpdfstring{$\ast$}{*}}]{dw\+\_\+arange\+\_\+count}{, }\item[{\doxymbox{\hyperlink{group__allstructs_ga8d4fac0e48040b6ca91e06ffda09766a}{Dwarf\+\_\+\+Error}} \texorpdfstring{$\ast$}{*}}]{dw\+\_\+error}{}\end{DoxyParamCaption})}



Get access to CUs given code addresses. 

This intended as a fast-\/access to tie code addresses to CU dies. The data is in the .debug\+\_\+aranges section. which may appear in DWARF2,3,4, or DWARF5.

\begin{DoxySeeAlso}{See also}
\doxylink{group__exampleu}{Reading an aranges section}
\end{DoxySeeAlso}

\begin{DoxyParams}{Parameters}
{\em dw\+\_\+dbg} & The \doxylink{group__allstructs_gac2ba1e1c1b70a3191506b414195ca807}{Dwarf\+\_\+\+Debug} of interest. \\
\hline
{\em dw\+\_\+aranges} & On success returns a pointer to an array of \doxylink{group__allstructs_ga293719c19ccd6a950e3f104d3fc54ffa}{Dwarf\+\_\+\+Arange} pointers. \\
\hline
{\em dw\+\_\+arange\+\_\+count} & On success returns a count of the length of the array. \\
\hline
{\em dw\+\_\+error} & On error dw\+\_\+error is set to point to the error details. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The usual value:\+ DW\+\_\+\+DLV\+\_\+\+OK etc. Returns DW\+\_\+\+DLV\+\_\+\+NO\+\_\+\+ENTRY if there is no such section. 
\end{DoxyReturn}
\Hypertarget{group__aranges_gad91d58577efcfca0864adcaadd44ffa1}\index{Fast Access to a CU given a code address@{Fast Access to a CU given a code address}!dwarf\_get\_cu\_die\_offset@{dwarf\_get\_cu\_die\_offset}}
\index{dwarf\_get\_cu\_die\_offset@{dwarf\_get\_cu\_die\_offset}!Fast Access to a CU given a code address@{Fast Access to a CU given a code address}}
\doxysubsubsection{\texorpdfstring{dwarf\_get\_cu\_die\_offset()}{dwarf\_get\_cu\_die\_offset()}}
{\footnotesize\ttfamily \label{group__aranges_gad91d58577efcfca0864adcaadd44ffa1} 
DW\+\_\+\+API int dwarf\+\_\+get\+\_\+cu\+\_\+die\+\_\+offset (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{group__allstructs_ga293719c19ccd6a950e3f104d3fc54ffa}{Dwarf\+\_\+\+Arange}}}]{dw\+\_\+arange}{, }\item[{\doxymbox{\hyperlink{group__basicdatatypes_ga08c706887ae8c6e09e8f0fb5dd9a539e}{Dwarf\+\_\+\+Off}} \texorpdfstring{$\ast$}{*}}]{dw\+\_\+return\+\_\+offset}{, }\item[{\doxymbox{\hyperlink{group__allstructs_ga8d4fac0e48040b6ca91e06ffda09766a}{Dwarf\+\_\+\+Error}} \texorpdfstring{$\ast$}{*}}]{dw\+\_\+error}{}\end{DoxyParamCaption})}



Given an arange return its CU DIE offset. 


\begin{DoxyParams}{Parameters}
{\em dw\+\_\+arange} & The specific arange of interest. \\
\hline
{\em dw\+\_\+return\+\_\+offset} & The CU DIE offset (in .debug\+\_\+info) applicable to this arange.. \\
\hline
{\em dw\+\_\+error} & On 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}
