mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Adds tools/symbolize_crash.cpp, built alongside the game as a console exe: it reads a crash_report_*.txt written by writeExceptionBacktrace and prints the backtrace with function names, source lines and inlined frames, in call order, coloured when standard output is a console. Symbols come from DbgHelp against the build's PDB rather than an external symbolizer. SymLoadModuleEx takes the runtime base out of the report's module table, so the relocation arithmetic /DYNAMICBASE forces on us is DbgHelp's problem now; a report predating the module table loads at the image's preferred base, which is where it ran. Verified under Wine: PDB line info and inline traces both resolve. The tool wants C++23 (std::print, std::format) where the game is C++17, so the standard is set on the target alone. Both MSVC 19.51 and clang-cl build it clean in all three configurations. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>