Skip to content

Analyze C/C++ program crashes with the help of the crash offset

License

Notifications You must be signed in to change notification settings

JochenBaier/CrashExplorer

Repository files navigation

CrashExplorer

CrashExplorer is a tool to help analyze crashes of programs written with Visual Studio in C/C++.

After a crash matching symbol files (*.pdb) often do not exists or are not usable if the program is using a copy protection mechanism (e.g. hardware dongle).

In this case it is possible to use a combination of Map files (*.map) and a listing files (*.cod) files. The map file lists all functions of the program with addresses. The listing files maps source code to assembler code per translation unit. The manual way is described in these CodeProject articles 'How to Debug the Exception' and 'Using Windows Event Viewer to debug crashes'

Example Analyze output

Analyze a crash using Windows Event Viewer Log entry

  • Faulting module map file: Select the generated map file of the faulting module from the Event Viewer Log entry.
  • Crash Address: Copy 'Fault offset' from Event Viewer Log entry

Analyze a crash using a crash dump loaded in Visual Studio

  • Call Stack address: Copy address from the 'Disassembly' window.
  • Module base address: Copy module base address form the 'Modules' window from the faulting module (exe or dll)

Download

Current Version 0.1.0.0

Installation

Unzip CrashExplorer-0100.zip to any location. Start CrashExplorer.exe.

Necessary settings in Visual Studio Project:

Enable map file: 'Configuration Properties->Linker->Debugging->Generate Map File' ('/MAP') for the faulting module (exe or dll). CMake: target_link_options(project PRIVATE "/MAP")

Enable Assembler output: 'Configuration Properties->C/C++->Output Files->Assembler Output': 'Assembly, Machine Code and Source (/FAcs)' CMake: add_compile_options(/FAcs) in topmost CMakeLists.txt

Hints

License

CrashExplorer is released under the GNU General Public License 3

The example_project uses code from www.geeksforgeeks.org.

Changelog

  • 0.1.0.0 (11 July 2021)
    • Initial release

Contact/Copyright

Email: [Jochen Baier](mailto:email a.t. jochen-baier.de)

The algorithm used in CrashExplorer is based on the CodeProject articles 'How to Debug the Exception' , 'Using Windows Event Viewer to debug crashes' and the help of my workmate Martin Strobel.

About

Analyze C/C++ program crashes with the help of the crash offset

Resources

License

Stars

Watchers

Forks

Packages

No packages published