How to write a sample code that will crash and produce dump file?

后端 未结 9 1425
礼貌的吻别
礼貌的吻别 2020-12-12 23:15

I started learned windbg and I found this good post How to use WinDbg to analyze the crash dump for VC++ application?

Now I want to follow the instructions and do it

9条回答
  •  鱼传尺愫
    2020-12-12 23:41

    Most of the times you will find all apps dump in C:\windows\minidumps.

    To generate a dump file you could use a simple solution:

    1. Open windbg
    2. File->Open Executable
    3. You run the app that will crash
    4. A breakpoint will trigger
    5. Now you can use .dump in windbg to create a dmp file

    or

    1. Run the app and wait to crash
    2. Open windbg and attach to process (File->Attach to process)
    3. run .dump

    This way you will be able to analyze that crash anytime :)

提交回复
热议问题