ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
platform_binary_match_t Struct Reference

Find which binary(ies) contain a given address. More...

#include <include/ascii-chat/platform/system.h>

Data Fields

char path [4096]
 
uintptr_t file_offset
 

Detailed Description

Find which binary(ies) contain a given address.

Platform-independent interface to scan the runtime memory map and find which loaded binary owns a given address. Used by backtrace symbol resolution to map runtime addresses to binaries, which are then passed to llvm-symbolizer or addr2line for function name lookup.

Implementations:

  • Linux: Scans /proc/self/maps to find executable segments
  • macOS: Iterates dyld-loaded images
  • Windows: Enumerates process modules via EnumProcessModules()
Parameters
addrRuntime address to look up
matchesOutput array to populate with matches (can be NULL)
max_matchesMaximum number of matches to return
Returns
Number of matches found (0, 1, or rarely 2)
Note
Multiple matches are possible but rare (would indicate overlapping mapped regions, a configuration error).

Definition at line 777 of file system.h.

Field Documentation

◆ file_offset

uintptr_t platform_binary_match_t::file_offset

File offset within the binary (for symbolizer)

Definition at line 781 of file system.h.

Referenced by get_binary_file_address_offsets().

◆ path

char platform_binary_match_t::path[4096]

Path to the binary (exe, .so, dylib, DLL, etc.)

Definition at line 779 of file system.h.

Referenced by get_binary_file_address_offsets().


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