libosmocore 1.9.0.196-9975
Osmocom core library
backtrace.c File Reference

Routines related to generating call back traces. More...

#include <stdio.h>
#include <stdlib.h>
#include <osmocom/core/utils.h>
#include <osmocom/core/logging.h>
#include "config.h"
#include <execinfo.h>

Functions

static void _osmo_backtrace (int use_printf, int subsys, int level)
 
void osmo_generate_backtrace (void)
 Generate and print a call back-trace. More...
 
void osmo_log_backtrace (int subsys, int level)
 Generate and log a call back-trace. More...
 

Detailed Description

Routines related to generating call back traces.

Function Documentation

◆ _osmo_backtrace()

static void _osmo_backtrace ( int  use_printf,
int  subsys,
int  level 
)
static

◆ osmo_generate_backtrace()

void osmo_generate_backtrace ( void  )

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 _osmo_backtrace().

Referenced by osmo_panic_default().

◆ osmo_log_backtrace()

void osmo_log_backtrace ( int  subsys,
int  level 
)

Generate and log a call back-trace.

Parameters
[in]subsysLogging sub-system
[in]levelLogging level

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 _osmo_backtrace(), level, and subsys.

Referenced by _osmo_fsm_inst_dispatch().