Skip to content

Commit

Permalink
Improve docs for lookup functions in CodeObject (#1147)
Browse files Browse the repository at this point in the history
Add wording to improve clarity about when a CodeRegion is strictly needed when using the lookup functions.

Co-authored-by: Tim Haines <thaines@cs.wisc.edu>
  • Loading branch information
hainest and Tim Haines committed Nov 11, 2021
1 parent 6eb8722 commit e672765
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions parseAPI/doc/API/CodeObject.tex
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,15 @@ \subsection{Class CodeObject}
\end{apient}
\apidesc{Speculatively parse the indicated region of the binary using the specified technique to find likely function entry points, enabled on the x86 and x86-64 platforms.}

\fbox{\begin{minipage}[t]{1\columnwidth}%
\begin{center}{\textbf{A note on using the lookup functions}}\end{center}\\
When parsing binary objects such as .o files and static libraries which may have multiple
\texttt{CodeRegion} objects that overlap in the address space, the \texttt{CodeRegion} argument
\textit{must} be passed. For executable binaries and shared libraries that are fully linked, there
is no ambiguity, and {\scshape null} can be passed. The only exception is \texttt{findFuncsByBlock}
which always requires a valid \texttt{CodeRegion}.%
\end{minipage}}

\begin{apient}
Function * findFuncByEntry(CodeRegion * cr,
Address entry)
Expand Down

0 comments on commit e672765

Please sign in to comment.