Menu

#204 Dump register and stack when GPF

open
nobody
None
2
2014-08-13
2003-11-06
ganier
No

From the idea launched by Kimmo launched in reference
to this link :
http://www.codeproject.com/cpp/dumphandle.asp

In that example, the dump is called normally from the
main. We must SetUnhandledExceptionFilter to handle
unhandled exceptions.
This link describes how to do :
http://www.microsoft.com/msj/0597/hood0597.aspx

The presentation is different : no windows (less
ergonomic, but a lot more robust), and a call stack with
symbolic function names instead of a track trace (if the
right version of IMAGEHLP.DLL + debug info are present).

Here is the generated file :
//=========================================
============
Exception code: C0000005 ACCESS_VIOLATION
Fault address: 0040245B 01:0000145B
E:\programmation\testB\Debug\testB.exe

Registers:
EAX:00000008
EBX:7FFDF000
ECX:00000000
EDX:00860F68
ESI:80000002
EDI:0012FEC4
CS:EIP:001B:0040245B
SS:ESP:0023:0012FE78 EBP:0012FEC4
DS:0023 ES:0023 FS:0038 GS:0000
Flags:00010206

Call stack:
Address Frame
0040245B 0012FEC4 YetAnotherFunction+1B
004024AC 0012FF24 MyWonderfulFunction+2C
00401723 0012FF80 main+33
00403019 0012FFC0 mainCRTStartup+E9
77E614C7 0012FFF0 GetCurrentDirectoryW+44

Discussion

  • Kimmo Varis

    Kimmo Varis - 2004-05-12

    Logged In: YES
    user_id=631874

    There is another interesting component:
    http://www.codeproject.com/tools/blackbox.asp

     
  • ganier

    ganier - 2004-05-12

    Logged In: YES
    user_id=804270

    I will have a look.
    I did not implement it because :
    - http://www.codeproject.com/cpp/dumphandle.asp was not
    so good (in my opinion)
    - http://www.microsoft.com/msj/0597/hood0597.aspx was
    very good. There was a very good source code. I sent them
    a mail to ask if I may include it in a GPL product, and they
    refused. Although I am nearly sure they would not care if it
    were in a "closed-source" program, I don't want to introduce
    copyright problems in WinMerge.

    I hope this one is the good one.

     
  • Kimmo Varis

    Kimmo Varis - 2006-07-03
    • priority: 5 --> 2
     

Log in to post a comment.