ascii-chat 0.6.0
Real-time terminal-based video chat with ASCII art conversion
Loading...
Searching...
No Matches
symbols.c File Reference

🔍 Symbol resolution cache: llvm-symbolizer/addr2line wrapper with hashtable-backed caching More...

Go to the source code of this file.

Data Structures

struct  symbol_entry_t
 Symbol cache entry structure for address-to-symbol mapping. More...
 

Macros

#define LLVM_SYMBOLIZER_BIN   "llvm-symbolizer"
 
#define ADDR2LINE_BIN   "addr2line"
 
#define NULL_SENTINEL   "[NULL]"
 

Enumerations

enum  symbolizer_type_t { SYMBOLIZER_NONE = 0 , SYMBOLIZER_LLVM = 1 , SYMBOLIZER_ADDR2LINE = 2 }
 

Functions

asciichat_error_t symbol_cache_init (void)
 Initialize the symbol cache.
 
void symbol_cache_cleanup (void)
 Clean up the symbol cache and free all resources.
 
const char * symbol_cache_lookup (void *addr)
 Look up a symbol for a given address.
 
bool symbol_cache_insert (void *addr, const char *symbol)
 Insert a symbol into the cache.
 
void symbol_cache_get_stats (uint64_t *hits_out, uint64_t *misses_out, size_t *entries_out)
 Get cache statistics.
 
void symbol_cache_print_stats (void)
 Print cache statistics to logging system.
 
char ** symbol_cache_resolve_batch (void *const *buffer, int size)
 Resolve multiple addresses using addr2line and cache results.
 
void symbol_cache_free_symbols (char **symbols)
 Free symbol array returned by symbol_cache_resolve_batch.
 

Detailed Description

🔍 Symbol resolution cache: llvm-symbolizer/addr2line wrapper with hashtable-backed caching

Definition in file symbols.c.

Macro Definition Documentation

◆ ADDR2LINE_BIN

#define ADDR2LINE_BIN   "addr2line"

Definition at line 15 of file symbols.c.

◆ LLVM_SYMBOLIZER_BIN

#define LLVM_SYMBOLIZER_BIN   "llvm-symbolizer"

Definition at line 14 of file symbols.c.

◆ NULL_SENTINEL

#define NULL_SENTINEL   "[NULL]"

Definition at line 43 of file symbols.c.

Enumeration Type Documentation

◆ symbolizer_type_t

Enumerator
SYMBOLIZER_NONE 
SYMBOLIZER_LLVM 
SYMBOLIZER_ADDR2LINE 

Definition at line 49 of file symbols.c.

49 {
50 SYMBOLIZER_NONE = 0, // No symbolizer available, use raw addresses
51 SYMBOLIZER_LLVM = 1, // llvm-symbolizer (preferred on all platforms)
52 SYMBOLIZER_ADDR2LINE = 2, // addr2line (fallback)
symbolizer_type_t
Definition symbols.c:49
@ SYMBOLIZER_NONE
Definition symbols.c:50
@ SYMBOLIZER_LLVM
Definition symbols.c:51
@ SYMBOLIZER_ADDR2LINE
Definition symbols.c:52