ascii-chat
Binary v0.16.50-198-g78f51665f
Library lib/v0.3.2-2240-g78f51665f
Video chat in your terminal
Loading...
Searching...
No Matches
backtrace.c File Reference

Go to the source code of this file.

Typedefs

typedef bool(* backtrace_frame_filter_t) (const char *frame)

Functions

bool backtrace_filter_error_internal (const char *frame)
void backtrace_capture (backtrace_t *bt)
void backtrace_capture_and_symbolize (backtrace_t *bt)
void backtrace_free (backtrace_t *bt)
void backtrace_t_free (backtrace_t *bt)
void backtrace_symbolize (backtrace_t *bt, const char *const *owned_dirs)
void backtrace_print (int level, const char *label, const backtrace_t *bt, int skip_frames, int max_frames, backtrace_frame_filter_t filter)
void backtrace_print_simple (int skip_frames)

Typedef Documentation

◆ backtrace_frame_filter_t

typedef bool(* backtrace_frame_filter_t) (const char *frame)

Definition at line 48 of file backtrace.c.

Function Documentation

◆ backtrace_capture()

void backtrace_capture ( backtrace_t * bt)

Definition at line 14 of file backtrace.c.

14 {
15 if (bt) {
16 bt->count = 0;
17 bt->symbols = NULL;
18 }
19}

◆ backtrace_capture_and_symbolize()

void backtrace_capture_and_symbolize ( backtrace_t * bt)

Definition at line 21 of file backtrace.c.

21 {
22 if (bt) {
23 bt->count = 0;
24 bt->symbols = NULL;
25 }
26}

◆ backtrace_filter_error_internal()

bool backtrace_filter_error_internal ( const char * frame)

Definition at line 9 of file backtrace.c.

9 {
10 (void)frame;
11 return false;
12}

◆ backtrace_free()

void backtrace_free ( backtrace_t * bt)

Definition at line 28 of file backtrace.c.

28 {
29 if (bt) {
30 bt->count = 0;
31 bt->symbols = NULL;
32 }
33}

◆ backtrace_print()

void backtrace_print ( int level,
const char * label,
const backtrace_t * bt,
int skip_frames,
int max_frames,
backtrace_frame_filter_t filter )

Definition at line 50 of file backtrace.c.

50 {
51 (void)level;
52 (void)label;
53 (void)bt;
54 (void)skip_frames;
55 (void)max_frames;
56 (void)filter;
57 // No-op for WASM
58}

◆ backtrace_print_simple()

void backtrace_print_simple ( int skip_frames)

Definition at line 60 of file backtrace.c.

60 {
61 (void)skip_frames;
62 // No-op for WASM
63}

Referenced by main().

◆ backtrace_symbolize()

void backtrace_symbolize ( backtrace_t * bt,
const char *const * owned_dirs )

Definition at line 42 of file backtrace.c.

42 {
43 (void)bt;
44 (void)owned_dirs;
45 // No-op for WASM
46}

◆ backtrace_t_free()

void backtrace_t_free ( backtrace_t * bt)

Definition at line 35 of file backtrace.c.

35 {
36 if (bt) {
37 bt->count = 0;
38 bt->symbols = NULL;
39 }
40}