ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
debug/backtrace.h
Go to the documentation of this file.
1
98#pragma once
99
100#include <stdbool.h>
101#include <stddef.h>
102
103#ifdef __cplusplus
104extern "C" {
105#endif
106
107/* backtrace_t is defined in asciichat_errno.h to avoid circular includes */
109
116typedef bool (*backtrace_frame_filter_t)(const char *frame);
117
127
137
146
156
199void backtrace_print(const char *label, const backtrace_t *bt, int skip_frames, int max_frames,
201
211void backtrace_print_many(const char *label, const backtrace_t *bts, int count);
212
260int backtrace_format(char *buf, size_t buf_size, const char *label, const backtrace_t *bt, int skip_frames,
261 int max_frames, backtrace_frame_filter_t filter);
262
279void backtrace_print_symbols(const char *label, char **symbols, int count, int skip_frames, int max_frames,
281
301void backtrace_log_frames(int num_frames, int skip_frames);
302
303#ifdef __cplusplus
304}
305#endif
⚠️‼️ Comprehensive thread-local error context system for ascii-chat
void backtrace_t_free(backtrace_t *bt)
Free backtrace symbols.
void backtrace_capture_and_symbolize(backtrace_t *bt)
Capture and symbolize in one call.
void backtrace_capture(backtrace_t *bt)
Capture current stack into bt.
int backtrace_format(char *buf, size_t buf_size, const char *label, const backtrace_t *bt, int skip_frames, int max_frames, backtrace_frame_filter_t filter)
Format backtrace to buffer (plain ASCII, no colors)
void backtrace_print(const char *label, const backtrace_t *bt, int skip_frames, int max_frames, backtrace_frame_filter_t filter)
Print backtrace with dual output: colored stderr + plain log file.
void backtrace_print_many(const char *label, const backtrace_t *bts, int count)
Print multiple backtraces.
bool(* backtrace_frame_filter_t)(const char *frame)
Frame filter callback for selective frame inclusion.
void backtrace_symbolize(backtrace_t *bt)
Symbolize bt->ptrs into bt->symbols.
void backtrace_log_frames(int num_frames, int skip_frames)
Log N backtrace frames with function name, line number, and file.
void backtrace_print_symbols(const char *label, char **symbols, int count, int skip_frames, int max_frames, backtrace_frame_filter_t filter)
Print pre-resolved backtrace symbols with consistent formatting.
int frame
Definition splash.c:99
ClangTool/LibTooling compatibility shim for stdbool.h.
#define bool
Definition stdbool.h:61