]>
Commit | Line | Data |
---|---|---|
9c640715 | 1 | /////////////////////////////////////////////////////////////////////////////// |
50bea100 | 2 | // Name: wx/msw/crashrpt.h |
9c640715 VZ |
3 | // Purpose: helpers for the structured exception handling (SEH) under Win32 |
4 | // Author: Vadim Zeitlin | |
5 | // Modified by: | |
6 | // Created: 13.07.2003 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwindows.org> | |
9 | // Licence: wxWindows licence | |
10 | /////////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifndef _WX_MSW_SEH_H_ | |
13 | #define _WX_MSW_SEH_H_ | |
14 | ||
15 | #include "wx/defs.h" | |
16 | ||
17 | #if wxUSE_ON_FATAL_EXCEPTION | |
18 | ||
19 | // ---------------------------------------------------------------------------- | |
50bea100 | 20 | // report generation flags |
9c640715 VZ |
21 | // ---------------------------------------------------------------------------- |
22 | ||
50bea100 VZ |
23 | enum |
24 | { | |
25 | // we always report where the crash occured | |
26 | wxCRASH_REPORT_LOCATION = 0, | |
27 | ||
28 | // if this flag is given, the call stack is dumped | |
29 | wxCRASH_REPORT_STACK = 1, | |
30 | ||
31 | // if this flag is given, the values of the local variables are dumped | |
32 | wxCRASH_REPORT_LOCALS = 2, | |
33 | ||
34 | // if this flag is given, the values of all global variables are dumped | |
35 | // | |
36 | // WARNING: this may take a very long time and generate megabytes of output | |
37 | // in a big program, this is why it is off by default | |
38 | wxCRASH_REPORT_GLOBALS = 4 | |
39 | }; | |
40 | ||
41 | // ---------------------------------------------------------------------------- | |
42 | // wxCrashReport: this class is used to create crash reports | |
43 | // ---------------------------------------------------------------------------- | |
44 | ||
45 | struct WXDLLIMPEXP_BASE wxCrashReport | |
9c640715 VZ |
46 | { |
47 | // set the name of the file to which the report is written, it is | |
48 | // constructed from the .exe name by default | |
49 | static void SetFileName(const wxChar *filename); | |
50 | ||
51 | // return the current file name | |
52 | static const wxChar *GetFileName(); | |
53 | ||
54 | // write the exception report to the file, return true if it could be done | |
55 | // or false otherwise | |
50bea100 VZ |
56 | static bool Generate(int flags = wxCRASH_REPORT_LOCATION | |
57 | wxCRASH_REPORT_STACK | | |
58 | wxCRASH_REPORT_LOCALS); | |
9c640715 VZ |
59 | }; |
60 | ||
61 | #endif // wxUSE_ON_FATAL_EXCEPTION | |
62 | ||
63 | #endif // _WX_MSW_SEH_H_ | |
64 |