\section{DynamoRIO}
\label{sec:dynamorio}

This section will give a short overview of the dynamic binary instrumentation tool DynamoRIO, which will be used throughout this thesis.

\subsection{Dynamic Binary Instrumentation}
\label{sec:dbi}

\revabbr{Dynamic binary instrumentation}{DBI} is a method for analyzing and manipulating the behavior of a binary application while it is running.
This is achieved through the injection of additional instructions into the instruction trace of the target application.

Debuggers on the other hand, use special breakpoint instructions (e.g. INT3 on x86 or BKPT on ARM) that get injected at specific places in the code.
When reaching those breakpoint instructions, a context switch to the operating system kernel will be performed, however, those context switches, result in a significant performance penalty as the processor state has to be saved and restored afterwards. (TODO irgendwie literatur referenz hier)

Because the instrumentation tool runs in the same process as the application, it is important that it operates transparently, meaning that it will not affect the application behavior in unintended ways.
This is a special challenge as the dynamic instrumentation is not allowed to use the same memory routines or input/output buffering as the application \cite{Bruening2003}.

In contrast to static code analysis, which cannot predict the execution path of the program, the full runtime information is available to the dynamic instrumentation.

So DBI can be a mature choice for examining the runtime behavior of a binary application in a performant way.

The following section \ref{sec:dynamorio_core} will explain how the core functionality of the DBI tool DynamoRIO works.

\subsection{DynamoRIO Core}
\label{sec:dynamorio_core}

% vlt auf transparenz eingehen wie dies gelöst wird.
\input{img/thesis.tikzstyles}
\begin{figure}[!ht]
\begin{center}
\tikzfig{img/dynamorio}
\caption{DynamoRIO runtime code manipulation layer \cite{Bruening2003}.}
\label{fig:dynamorio}
\end{center}
\end{figure}

\subsection{DynamoRIO Client}
\label{sec:dynamorio_client}


\subsection{DynamoRIO API}
\label{sec:dynamorio_api}
