My Project
programmer's documentation
|
#include "cs_defs.h"
#include <assert.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "bft_backtrace.h"
Functions | |
bft_backtrace_t * | bft_backtrace_create (void) |
Build a backtrace description structure. More... | |
bft_backtrace_t * | bft_backtrace_destroy (bft_backtrace_t *bt) |
Free a backtrace description structure. More... | |
void | bft_backtrace_demangle (bft_backtrace_t *bt) |
Demangle a backtrace description structure (for C++). More... | |
int | bft_backtrace_size (const bft_backtrace_t *bt) |
Return the depth of a backtrace. More... | |
const char * | bft_backtrace_file (bft_backtrace_t *bt, int depth) |
Return file name associated with a backtrace at a given depth. More... | |
const char * | bft_backtrace_function (bft_backtrace_t *bt, int depth) |
Return function name associated with a backtrace at a given depth. More... | |
const char * | bft_backtrace_address (bft_backtrace_t *bt, int depth) |
Return address associated with a backtrace at a given depth. More... | |
void | bft_backtrace_print (int start_depth) |
Print a backtrace. More... | |
bft_backtrace_print_t * | bft_backtrace_print_get (void) |
Returns backtrace print function. More... | |
void | bft_backtrace_print_set (bft_backtrace_print_t *const fct) |
Sets a backtrace print function. More... | |
const char* bft_backtrace_address | ( | bft_backtrace_t * | bt, |
int | depth | ||
) |
Return address associated with a backtrace at a given depth.
[in] | bt | pointer to backtrace description structure. |
[in] | depth | index in backtrace structure (< bft_backtrace_size(bt)). |
bft_backtrace_t* bft_backtrace_create | ( | void | ) |
Build a backtrace description structure.
void bft_backtrace_demangle | ( | bft_backtrace_t * | bt | ) |
Demangle a backtrace description structure (for C++).
[in,out] | bt | pointer to backtrace description structure. |
bft_backtrace_t* bft_backtrace_destroy | ( | bft_backtrace_t * | bt | ) |
Free a backtrace description structure.
[in,out] | bt | pointer to backtrace description structure. |
const char* bft_backtrace_file | ( | bft_backtrace_t * | bt, |
int | depth | ||
) |
Return file name associated with a backtrace at a given depth.
[in] | bt | pointer to backtrace description structure. |
[in] | depth | index in backtrace structure (< bft_backtrace_size(bt)). |
const char* bft_backtrace_function | ( | bft_backtrace_t * | bt, |
int | depth | ||
) |
Return function name associated with a backtrace at a given depth.
[in] | bt | pointer to backtrace description structure. |
[in] | depth | index in backtrace structure (< bft_backtrace_size(bt)). |
void bft_backtrace_print | ( | int | start_depth | ) |
Print a backtrace.
[in] | start_depth | depth of backtrace at which to start printing (0 for all, including backtrace print function) |
bft_backtrace_print_t* bft_backtrace_print_get | ( | void | ) |
Returns backtrace print function.
void bft_backtrace_print_set | ( | bft_backtrace_print_t *const | fct | ) |
Sets a backtrace print function.
[in] | fct | pointer to a bft_backtrace_print_t type function. |
int bft_backtrace_size | ( | const bft_backtrace_t * | bt | ) |
Return the depth of a backtrace.
[in] | bt | pointer to backtrace description structure. |