\section{Introduction}
\label{sec:intro}
This document describes StackwalkerAPI, an API and library for walking a call
stack. The call stack (also known as the run-time stack) is a stack found in a
process that contains the currently active stack frames. Each stack frame is a
record of an executing function (or function-like object such as a signal
handler or system call). StackwalkerAPI provides an API that allows users to
collect a call stack (known as walking the call stack) and access information
about its stack frames. The current implementation supports Linux/x86,
Linux/x86-64, Linux/Power, Linux/Power-64, and Windows/x86.
StackwalkerAPI is designed to be both easy-to-use and easy-to-extend. Users can
easily use StackwalkerAPI to walk a call stack without needing to understand how
call stacks are laid out on their platform. Users can easily extend
StackwalkerAPI to work with new platforms and types of stack frames by
implementing a set of callbacks that can be plugged into StackwalkerAPI.
StackwalkerAPI's ease-of-use comes from it providing a platform independent
interface that allows users to access detailed information about the call stack.
For example, the following C++ code-snippet is all that is needed to walk and
print the call stack of the currently running thread.
\lstset{language=[GNU]C++,basicstyle=\ttfamily\selectfont\small}
\lstset{numbers=none}
\begin{lstlisting}
std::vector stackwalk;
string s;
Walker *walker = Walker::newWalker();
walker->walkStack(stackwalk);
for (unsigned i=0; i