bombela / backward-cpp

A beautiful stack trace pretty printer for C++
MIT License
3.77k stars 480 forks source link

Crash logs could include the base address of the process #192

Open TylerGlaiel opened 3 years ago

TylerGlaiel commented 3 years ago

trying to figure out how to get a better stack trace without needing to include the PDB file for end users, came up with this very simple change

on windows I just include libloaderapi.h then add this to "print_header" os << " (base address: " << GetModuleHandle(NULL) << ")";

with this information it makes it possible to resolve the source files/line numbers from the printed addresses even if the dump itself was missing those