]>
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$ | |
77ffb593 | 8 | // Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org> |
65571936 | 9 | // Licence: wxWindows licence |
9c640715 VZ |
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 | |
8d008965 VZ |
29 | // |
30 | // this results in dump/crash report as small as possible, this is the | |
31 | // default flag | |
50bea100 VZ |
32 | wxCRASH_REPORT_STACK = 1, |
33 | ||
34 | // if this flag is given, the values of the local variables are dumped | |
8d008965 VZ |
35 | // |
36 | // note that this will result in huge file containing the dump of the | |
37 | // entire process memory space when using mini dumps! | |
50bea100 VZ |
38 | wxCRASH_REPORT_LOCALS = 2, |
39 | ||
40 | // if this flag is given, the values of all global variables are dumped | |
41 | // | |
8d008965 VZ |
42 | // this creates a much larger mini dump and also takes more time to |
43 | // generate if our own crash reporting code is used | |
50bea100 VZ |
44 | wxCRASH_REPORT_GLOBALS = 4 |
45 | }; | |
46 | ||
47 | // ---------------------------------------------------------------------------- | |
48 | // wxCrashReport: this class is used to create crash reports | |
49 | // ---------------------------------------------------------------------------- | |
50 | ||
51 | struct WXDLLIMPEXP_BASE wxCrashReport | |
9c640715 VZ |
52 | { |
53 | // set the name of the file to which the report is written, it is | |
54 | // constructed from the .exe name by default | |
55 | static void SetFileName(const wxChar *filename); | |
56 | ||
57 | // return the current file name | |
58 | static const wxChar *GetFileName(); | |
59 | ||
60 | // write the exception report to the file, return true if it could be done | |
61 | // or false otherwise | |
50bea100 | 62 | static bool Generate(int flags = wxCRASH_REPORT_LOCATION | |
8d008965 | 63 | wxCRASH_REPORT_STACK); |
9c640715 VZ |
64 | }; |
65 | ||
66 | #endif // wxUSE_ON_FATAL_EXCEPTION | |
67 | ||
68 | #endif // _WX_MSW_SEH_H_ | |
69 |