\doxysection{src/core/backtrace.c File Reference}
\label{backtrace_8c}\index{src/core/backtrace.c@{src/core/backtrace.c}}


Routines related to generating call back traces.  


{\ttfamily \#include $<$stdio.\+h$>$}\newline
{\ttfamily \#include $<$stdlib.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/utils.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/logging.\+h$>$}\newline
{\ttfamily \#include \char`\"{}config.\+h\char`\"{}}\newline
{\ttfamily \#include $<$execinfo.\+h$>$}\newline
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
static void \textbf{ \+\_\+osmo\+\_\+backtrace} (int use\+\_\+printf, int \textbf{ subsys}, int \textbf{ level})
\item 
void \textbf{ osmo\+\_\+generate\+\_\+backtrace} (void)
\begin{DoxyCompactList}\small\item\em Generate and print a call back-\/trace. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+log\+\_\+backtrace} (int \textbf{ subsys}, int \textbf{ level})
\begin{DoxyCompactList}\small\item\em Generate and log a call back-\/trace. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Routines related to generating call back traces. 



\doxysubsection{Function Documentation}
\mbox{\label{backtrace_8c_a7a79fd63496bc911b8321e5ab3e37ee7}} 
\index{backtrace.c@{backtrace.c}!\_osmo\_backtrace@{\_osmo\_backtrace}}
\index{\_osmo\_backtrace@{\_osmo\_backtrace}!backtrace.c@{backtrace.c}}
\doxysubsubsection{\_osmo\_backtrace()}
{\footnotesize\ttfamily static void \+\_\+osmo\+\_\+backtrace (\begin{DoxyParamCaption}\item[{int}]{use\+\_\+printf,  }\item[{int}]{subsys,  }\item[{int}]{level }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ ARRAY\+\_\+\+SIZE}, \textbf{ level}, \textbf{ LOGP}, and \textbf{ subsys}.



Referenced by \textbf{ osmo\+\_\+generate\+\_\+backtrace()}, and \textbf{ osmo\+\_\+log\+\_\+backtrace()}.

\mbox{\label{backtrace_8c_ae1d7c5276d845c48c0b964a1033b6c60}} 
\index{backtrace.c@{backtrace.c}!osmo\_generate\_backtrace@{osmo\_generate\_backtrace}}
\index{osmo\_generate\_backtrace@{osmo\_generate\_backtrace}!backtrace.c@{backtrace.c}}
\doxysubsubsection{osmo\_generate\_backtrace()}
{\footnotesize\ttfamily void osmo\+\_\+generate\+\_\+backtrace (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Generate and print a call back-\/trace. 

This function will generate a function call back-\/trace of the current process and print it to stdout. 

References \textbf{ \+\_\+osmo\+\_\+backtrace()}.



Referenced by \textbf{ osmo\+\_\+panic\+\_\+default()}.

\mbox{\label{backtrace_8c_a89adddebf59157ca25eb6cb422a02151}} 
\index{backtrace.c@{backtrace.c}!osmo\_log\_backtrace@{osmo\_log\_backtrace}}
\index{osmo\_log\_backtrace@{osmo\_log\_backtrace}!backtrace.c@{backtrace.c}}
\doxysubsubsection{osmo\_log\_backtrace()}
{\footnotesize\ttfamily void osmo\+\_\+log\+\_\+backtrace (\begin{DoxyParamCaption}\item[{int}]{subsys,  }\item[{int}]{level }\end{DoxyParamCaption})}



Generate and log a call back-\/trace. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em subsys} & Logging sub-\/system \\
\hline
\mbox{\texttt{ in}}  & {\em level} & Logging level\\
\hline
\end{DoxyParams}
This function will generate a function call back-\/trace of the current process and log it to the specified subsystem and level using the libosmocore logging subsystem 

References \textbf{ \+\_\+osmo\+\_\+backtrace()}, \textbf{ level}, and \textbf{ subsys}.



Referenced by \textbf{ \+\_\+osmo\+\_\+fsm\+\_\+inst\+\_\+dispatch()}.

