\section{lib/c++/stub.c File Reference}
\label{stub_8c}\index{lib/c++/stub.c@{lib/c++/stub.c}}
A collection of dirty hacks to get C++ compilation going. 

{\tt \#include $<$stdlib.h$>$}\par
\subsection*{Functions}
\begin{CompactItemize}
\item 
void {\bf exit} (int)
\begin{CompactList}\small\item\em Abort execution. \item\end{CompactList}\item 
void {\bf \_\-\_\-sjthrow} ()
\begin{CompactList}\small\item\em Throw an execption in a setjmp environment. \item\end{CompactList}\item 
void $\ast$ {\bf \_\-\_\-get\_\-eh\_\-context} ()
\begin{CompactList}\small\item\em Return current exception handler context. \item\end{CompactList}\item 
int {\bf \_\-\_\-rtti\_\-si} ()
\begin{CompactList}\small\item\em FIXME: rtti nop hack. \item\end{CompactList}\item 
int {\bf \_\-\_\-rtti\_\-user} ()
\begin{CompactList}\small\item\em FIXME: rtti nop hack. \item\end{CompactList}\item 
void {\bf \_\-\_\-builtin\_\-delete} (void $\ast$ptr)
\begin{CompactList}\small\item\em builtin delete function \item\end{CompactList}\item 
void $\ast$ {\bf \_\-\_\-builtin\_\-new} (unsigned int size)
\begin{CompactList}\small\item\em builtin new function \item\end{CompactList}\item 
void {\bf \_\-\_\-pure\_\-virtual} ()
\end{CompactItemize}


\subsection{Detailed Description}
A collection of dirty hacks to get C++ compilation going. 

\begin{Desc}
\item[Author:]Markus L. Noga $<${\tt markus@noga.de}$>$\end{Desc}
This stub provides the necessary runtime environment for basic C++. The following features currently work: \begin{itemize}
\item Classes \item Inheritance \item new and delete \item Virtual methods and destructors \end{itemize}


Several features are still amiss: \begin{itemize}
\item Throwing an exception will abort the current thread. \item RTTI is unimplemented. \end{itemize}


Definition in file {\bf stub.c}.

\subsection{Function Documentation}
\index{stub.c@{stub.c}!__builtin_delete@{\_\-\_\-builtin\_\-delete}}
\index{__builtin_delete@{\_\-\_\-builtin\_\-delete}!stub.c@{stub.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void \_\-\_\-builtin\_\-delete (void $\ast$ {\em ptr})}\label{stub_8c_a5}


builtin delete function 

frees the memory block \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ptr}]the block to free \end{description}
\end{Desc}


Definition at line 80 of file stub.c.

References free().\index{stub.c@{stub.c}!__builtin_new@{\_\-\_\-builtin\_\-new}}
\index{__builtin_new@{\_\-\_\-builtin\_\-new}!stub.c@{stub.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ \_\-\_\-builtin\_\-new (unsigned int {\em size})}\label{stub_8c_a6}


builtin new function 

creates a memory block for an object. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em size}]size of memory to allocate \end{description}
\end{Desc}


Definition at line 88 of file stub.c.

References malloc().\index{stub.c@{stub.c}!__get_eh_context@{\_\-\_\-get\_\-eh\_\-context}}
\index{__get_eh_context@{\_\-\_\-get\_\-eh\_\-context}!stub.c@{stub.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ \_\-\_\-get\_\-eh\_\-context ()}\label{stub_8c_a2}


Return current exception handler context. 

FIXME: null pointer returned 

Definition at line 62 of file stub.c.\index{stub.c@{stub.c}!__pure_virtual@{\_\-\_\-pure\_\-virtual}}
\index{__pure_virtual@{\_\-\_\-pure\_\-virtual}!stub.c@{stub.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void \_\-\_\-pure\_\-virtual ()}\label{stub_8c_a7}




Definition at line 94 of file stub.c.\index{stub.c@{stub.c}!__rtti_si@{\_\-\_\-rtti\_\-si}}
\index{__rtti_si@{\_\-\_\-rtti\_\-si}!stub.c@{stub.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int \_\-\_\-rtti\_\-si ()}\label{stub_8c_a3}


FIXME: rtti nop hack. 



Definition at line 66 of file stub.c.\index{stub.c@{stub.c}!__rtti_user@{\_\-\_\-rtti\_\-user}}
\index{__rtti_user@{\_\-\_\-rtti\_\-user}!stub.c@{stub.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int \_\-\_\-rtti\_\-user ()}\label{stub_8c_a4}


FIXME: rtti nop hack. 



Definition at line 70 of file stub.c.\index{stub.c@{stub.c}!__sjthrow@{\_\-\_\-sjthrow}}
\index{__sjthrow@{\_\-\_\-sjthrow}!stub.c@{stub.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void \_\-\_\-sjthrow ()}\label{stub_8c_a1}


Throw an execption in a setjmp environment. 

FIXME: this just terminates the task. 

Definition at line 55 of file stub.c.\index{stub.c@{stub.c}!exit@{exit}}
\index{exit@{exit}!stub.c@{stub.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void exit (int)}\label{stub_8c_a0}


Abort execution. 

Functional version, calls exit(1) 

Definition at line 43 of file stub.c.

Referenced by fatal(), image\_\-dl(), image\_\-load(), keepalive\-Send(), lnp\_\-download(), LNPinit(), lx\_\-from\_\-images(), main(), nbread(), rcx\_\-init(), rcx\_\-send(), rcx\_\-wakeup\_\-tower(), rcx\-Init(), srec\_\-load(), and symbols\_\-load().