ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
symbols.h
Go to the documentation of this file.
1
77
78#pragma once
79
80#include <stdint.h>
81#include <stddef.h>
82#include <stdbool.h>
83
84#include "../common.h"
85
90bool symbol_module_is_project(const char *module_name);
91
106asciichat_error_t symbol_format_source_path(const char *module_name, const char *source_path, char *output,
107 size_t output_size, bool *external, const char *const *owned_dirs);
108
109/* ============================================================================
110 * Symbol Cache Lifecycle
111 * @{
112 */
113
128
142
144
145/* ============================================================================
146 * Symbol Cache Operations
147 * @{
148 */
149
169const char *symbol_cache_lookup(void *addr);
170
189bool symbol_cache_insert(void *addr, const char *symbol);
190
192
193/* ============================================================================
194 * Symbol Cache Statistics
195 * @{
196 */
197
212void symbol_cache_get_stats(uint64_t *hits_out, uint64_t *misses_out, size_t *entries_out);
213
226
228
229/* ============================================================================
230 * Batch Symbol Resolution
231 * @{
232 */
233
264char **symbol_cache_resolve_batch(void *const *buffer, int size, const char *const *owned_dirs);
265
279void symbol_cache_free_symbols(char **symbols);
280
⚙️ Common definitions, error codes, macros, and types shared throughout the application
unsigned long long uint64_t
Definition common.h:63
asciichat_error_t
Error and exit codes - unified status values (0-255).
Definition error_codes.h:44
void symbol_cache_get_stats(uint64_t *hits_out, uint64_t *misses_out, size_t *entries_out)
Get cache statistics.
bool symbol_cache_insert(void *addr, const char *symbol)
Insert a symbol into the cache.
bool symbol_module_is_project(const char *module_name)
Check whether a module belongs to ascii-chat.
asciichat_error_t symbol_format_source_path(const char *module_name, const char *source_path, char *output, size_t output_size, bool *external, const char *const *owned_dirs)
Format a source path for a symbolized frame.
void symbol_cache_print_stats(void)
Print cache statistics to logging system.
const char * symbol_cache_lookup(void *addr)
Look up a symbol for a given address.
asciichat_error_t symbol_cache_init(void)
Initialize the symbol cache.
void symbol_cache_destroy(void)
Clean up the symbol cache and free all resources.
void symbol_cache_free_symbols(char **symbols)
Free symbol array returned by symbol_cache_resolve_batch.
char ** symbol_cache_resolve_batch(void *const *buffer, int size, const char *const *owned_dirs)
Resolve multiple addresses using addr2line and cache results.