thesis: Complete 2.8
This commit is contained in:
@@ -453,6 +453,16 @@ These other environment variables are described in the following:
|
||||
By default, function calls from everywhere are intercepted.
|
||||
\end{description}
|
||||
|
||||
The shared object currently supports intercepting the following functions:
|
||||
\texttt{malloc}, \texttt{calloc}, \texttt{realloc}, \texttt{reallocarray}, \texttt{free}, \texttt{getopt}, \texttt{exit},
|
||||
\texttt{read}, \texttt{pread}, \texttt{write}, \texttt{pwrite}, \texttt{close}, \texttt{sigaction}, \texttt{sem\_init},
|
||||
\texttt{sem\_open}, \texttt{sem\_post}, \texttt{sem\_wait}, \texttt{sem\_trywait}, \texttt{sem\_timedwait}, \texttt{sem\_getvalue},
|
||||
\texttt{sem\_close}, \texttt{sem\_unlink}, \texttt{sem\_destroy}, \texttt{shm\_open}, \texttt{shm\_unlink}, \texttt{mmap},
|
||||
\texttt{munmap}, \texttt{ftruncate}, \texttt{fork}, \texttt{wait}, \texttt{waitpid}, \texttt{execl}, \texttt{execlp},
|
||||
\texttt{execle}, \texttt{execv}, \texttt{execvp}, \texttt{execvpe}, \texttt{execve}, \texttt{fexecve}, \texttt{pipe},
|
||||
\texttt{dup}, \texttt{dup2}, \texttt{dup3}, \texttt{socket}, \texttt{bind}, \texttt{listen}, \texttt{accept}, \texttt{connect},
|
||||
\texttt{getaddrinfo}, \texttt{freeaddrinfo}, \texttt{send}, \texttt{sendto}, \texttt{sendmsg}, \texttt{recv}, \texttt{recvfrom},
|
||||
\texttt{recvmsg}, \texttt{getline}, \texttt{getdelim}.
|
||||
|
||||
\section{\texttt{intercept} Command}\label{sec:intercept-command}
|
||||
|
||||
@@ -498,7 +508,25 @@ intercept [-h] [-F FUNCTIONS] [-s] [-o | -L LIBRARIES] \
|
||||
|
||||
\section{Example}\label{sec:intercepting-example}
|
||||
|
||||
Lorem Ipsum.
|
||||
To make it easier for the reader listing \ref{lst:intercept-client} provides some recorded function calls.
|
||||
Most lines had to be broken up into multiple lines for better readability.
|
||||
The recorded calls stem from a program written by myself as a solution for an assignment in the Operating Systems course at university.
|
||||
It is a simple HTTP client.
|
||||
The program was invoked using \texttt{./intercept -o -{}- ./client http://www.complang.tuwien.ac.at/}.
|
||||
|
||||
The first number on each line indicates unix time with nanosecond precision.
|
||||
The second and third numbers correspond to the process ID and thread ID respectively.
|
||||
Each line contains either a recorded call to a function or a recorded return of a function.
|
||||
After the arguments of each function call a colon (\texttt{:}) indicates the beginning of meta-information.
|
||||
This information always includes the return address to where the function jumps when completed.
|
||||
If available, the interpretation of the return address is also provided.
|
||||
This includes the offset relative to the calling binary and a source file and line number combination if the binary was compiled using \texttt{gcc -g} or \texttt{gcc -gdwarf}.
|
||||
|
||||
\begin{listing}[htbp]
|
||||
\inputminted[fontsize=\tiny]{text}{listings/intercept-client.txt}
|
||||
\caption{Recoreded function calls from \texttt{./client}.}
|
||||
\label{lst:intercept-client}
|
||||
\end{listing}
|
||||
|
||||
|
||||
\section{Analyzing Intercepted Function Calls}\label{sec:analyzing-intercepted-function-calls}
|
||||
@@ -506,11 +534,6 @@ Lorem Ipsum.
|
||||
Lorem Ipsum.
|
||||
|
||||
|
||||
\section{Parsing Intercepted Function Calls in Python}\label{sec:parsing-intercepted-function-calls}
|
||||
|
||||
Lorem Ipsum.
|
||||
|
||||
|
||||
\section{Automated Testing on Intercepted Function Calls}\label{sec:automated-testing-on-intercepted-function-calls}
|
||||
|
||||
Lorem Ipsum.
|
||||
|
||||
Reference in New Issue
Block a user