ascii-chat 0.6.0
Real-time terminal-based video chat with ASCII art conversion
Loading...
Searching...
No Matches
symbol_entry_t Struct Reference

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

Data Fields

void * addr
 Memory address key (used for hashtable lookup)
 
char * symbol
 Resolved symbol string (allocated, owned by cache)
 
UT_hash_handle hh
 uthash handle (required for hash table operations)
 

Detailed Description

Symbol cache entry structure for address-to-symbol mapping.

Represents a single cached symbol resolution in the symbol cache hashtable. Maps a memory address (key) to a resolved symbol name (value) to avoid expensive addr2line subprocess spawns for the same addresses.

CORE FIELDS:

  • addr: Memory address key (used for hashtable lookup)
  • symbol: Resolved symbol string (allocated, owned by cache)
  • hh: uthash handle (required for hash table operations)

USAGE:

This structure is used internally by the symbol cache hashtable:

  • Key: Memory address (void*) from backtrace
  • Value: Symbol name string (e.g., "main", "process_packet", etc.)

CACHE OPERATIONS:

  • Lookup: Fast O(1) hashtable lookup by address
  • Insertion: Cached after first addr2line resolution
  • Lifetime: Owned by cache, freed on cache cleanup

MEMORY MANAGEMENT:

  • symbol string is allocated and owned by the cache
  • Do not free symbol strings manually (cache manages them)
  • Entries are managed by uthash
Note
This structure is used internally by the symbol cache implementation. Users should interact with the cache via symbol_cache_* functions.

Definition at line 105 of file symbols.c.

Field Documentation

◆ addr

void* symbol_entry_t::addr

Memory address key (used for hashtable lookup)

Definition at line 107 of file symbols.c.

Referenced by symbol_cache_insert().

◆ hh

UT_hash_handle symbol_entry_t::hh

uthash handle (required for hash table operations)

Definition at line 111 of file symbols.c.

◆ symbol

char* symbol_entry_t::symbol

Resolved symbol string (allocated, owned by cache)

Definition at line 109 of file symbols.c.

Referenced by symbol_cache_cleanup(), symbol_cache_insert(), and symbol_cache_lookup().


The documentation for this struct was generated from the following file: