| 437 | } |
| 438 | |
| 439 | static 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 | |
| 462 | static void SymbolAddressErrorCb( void* data, const char* /*msg*/, int /*errnum*/ ) |
| 463 | { |
nothing calls this directly
no test coverage detected