MCPcopy Create free account
hub / github.com/crossuo/crossuo / SymbolAddressDataCb

Function SymbolAddressDataCb

external/tracy/client/TracyCallstack.cpp:439–460  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

437}
438
439static int SymbolAddressDataCb( void* data, uintptr_t pc, const char* fn, int lineno, const char* function )
440{
441 auto& sym = *(SymbolData*)data;
442 if( !fn )
443 {
444 const char* symloc = nullptr;
445 Dl_info dlinfo;
446 if( dladdr( (void*)pc, &dlinfo ) ) symloc = dlinfo.dli_fname;
447 if( !symloc ) symloc = "[unknown]";
448 sym.file = symloc;
449 sym.line = 0;
450 sym.needFree = false;
451 }
452 else
453 {
454 sym.file = CopyString( fn );
455 sym.line = lineno;
456 sym.needFree = true;
457 }
458
459 return 1;
460}
461
462static void SymbolAddressErrorCb( void* data, const char* /*msg*/, int /*errnum*/ )
463{

Callers

nothing calls this directly

Calls 1

CopyStringFunction · 0.85

Tested by

no test coverage detected